mirror of
https://github.com/versia-pub/frontend.git
synced 2025-12-06 16:38:20 +01:00
11 lines
255 B
TypeScript
11 lines
255 B
TypeScript
export const wrapUrl = (path: string) => {
|
|
const authStore = useAuthStore();
|
|
|
|
return new URL(
|
|
path,
|
|
authStore.instance
|
|
? `https://${authStore.instance.domain}`
|
|
: window.location.origin,
|
|
).toString();
|
|
};
|