|
|
@@ -20,7 +20,7 @@ const redirectToLoginIfUnauthorized = (error: unknown) => {
|
|
|
|
|
|
// Redirect to our custom login page instead of OAuth
|
|
|
const currentPath = window.location.pathname;
|
|
|
- window.location.href = `/login?returnTo=${encodeURIComponent(currentPath)}`;
|
|
|
+ window.location.href = `${import.meta.env.BASE_URL}login?returnTo=${encodeURIComponent(currentPath)}`;
|
|
|
};
|
|
|
|
|
|
queryClient.getQueryCache().subscribe(event => {
|
|
|
@@ -42,7 +42,7 @@ queryClient.getMutationCache().subscribe(event => {
|
|
|
const trpcClient = trpc.createClient({
|
|
|
links: [
|
|
|
httpBatchLink({
|
|
|
- url: "/api/trpc",
|
|
|
+ url: `${import.meta.env.BASE_URL}api/trpc`,
|
|
|
transformer: superjson,
|
|
|
fetch(input, init) {
|
|
|
return globalThis.fetch(input, {
|