(linkId: string, role: CollabRole)
| 78 | } |
| 79 | |
| 80 | export function buildShareUrl(linkId: string, role: CollabRole): string { |
| 81 | const base = |
| 82 | typeof window !== "undefined" |
| 83 | ? window.location.origin |
| 84 | : "http://localhost:3000"; |
| 85 | return `${base}/join/${linkId}?role=${role}`; |
| 86 | } |
| 87 | |
| 88 | export function labelForRole(role: CollabRole): string { |
| 89 | return { owner: "Owner", collaborator: "Collaborator", viewer: "Viewer" }[ |
nothing calls this directly
no outgoing calls
no test coverage detected