chat-ui / src /lib /utils /getShareUrl.ts
nsarrazin's picture
nsarrazin HF staff
Remove shared routes (#478)
a799675 unverified
raw
history blame contribute delete
266 Bytes
import { base } from "$app/paths";
import { PUBLIC_ORIGIN, PUBLIC_SHARE_PREFIX } from "$env/static/public";
export function getShareUrl(url: URL, shareId: string): string {
return `${PUBLIC_SHARE_PREFIX || `${PUBLIC_ORIGIN || url.origin}${base}`}/r/${shareId}`;
}