mirror of
https://github.com/penpot/penpot.git
synced 2026-05-16 21:43:40 +00:00
11 lines
373 B
TypeScript
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}`;
|
|
}
|