diff --git a/apps/client/pages/_app.tsx b/apps/client/pages/_app.tsx index 8b8c1c4a..c4e9fddf 100644 --- a/apps/client/pages/_app.tsx +++ b/apps/client/pages/_app.tsx @@ -83,7 +83,7 @@ export default function App({ - + <> {Page.isPublic === true ? ( diff --git a/libs/client/shared/src/providers/AxiosProvider.tsx b/libs/client/shared/src/providers/AxiosProvider.tsx index 38aa8d50..f292dd4c 100644 --- a/libs/client/shared/src/providers/AxiosProvider.tsx +++ b/libs/client/shared/src/providers/AxiosProvider.tsx @@ -67,8 +67,8 @@ function createInstance(options?: CreateInstanceOptions) { return instance } -export function AxiosProvider({ children }: PropsWithChildren) { - const API_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:3333' +export function AxiosProvider({ children, baseUrl }: PropsWithChildren<{baseUrl: string?}>) { + const API_URL = baseUrl || 'http://localhost:3333' // Expose a default instance with auth, superjson, headers const defaultInstance = useMemo(() => {