mirror of
https://github.com/versia-pub/frontend.git
synced 2026-06-14 07:29:15 +02:00
10 lines
263 B
TypeScript
10 lines
263 B
TypeScript
export const wrapUrl = (path: string) => {
|
|
const authStore = useAuthStore();
|
|
|
|
return new URL(
|
|
path,
|
|
authStore.instanceOptional
|
|
? `https://${authStore.instance.domain}`
|
|
: window.location.origin,
|
|
).toString();
|
|
};
|