penpot/plugins/apps/e2e/src/utils/get-file-url.ts
2026-02-13 13:17:08 +01:00

11 lines
373 B
TypeScript

import { FileRpc } from '../models/file-rpc.model';
import { cleanId } from './clean-id';
export function getFileUrl(file: FileRpc) {
const projectId = cleanId(file['~:project-id']);
const fileId = cleanId(file['~:id']);
const pageId = cleanId(file['~:data']['~:pages'][0]);
return `https://localhost:3449/#/workspace/${projectId}/${fileId}?page-id=${pageId}`;
}