diff --git a/apps/customer/components/App/Providers/Providers.tsx b/apps/customer/components/App/Providers/Providers.tsx index 2343541f..19d8e340 100644 --- a/apps/customer/components/App/Providers/Providers.tsx +++ b/apps/customer/components/App/Providers/Providers.tsx @@ -13,6 +13,14 @@ import StyleProviders from './Style/StyleProviders'; const queryClient = new QueryClient(); +const baseUrl = typeof window !== 'undefined' ? window.location.origin : ''; + +console.log( + '%c baseUrl', + 'color:white; padding: 30px; background-color: darkgreen', + baseUrl +); + function Providers({ children }: { children: React.ReactNode }) { return ( @@ -20,7 +28,7 @@ function Providers({ children }: { children: React.ReactNode }) { {children} diff --git a/apps/customer/next.config.mjs b/apps/customer/next.config.mjs index 13a34797..2ffea8b0 100644 --- a/apps/customer/next.config.mjs +++ b/apps/customer/next.config.mjs @@ -11,6 +11,9 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url)); const isStandalone = process.env.STANDALONE === 'true'; const nextConfig = { + env: { + NEXT_PUBLIC_URL: process.env.URL, + }, sassOptions: { includePaths: [path.join(__dirname, 'styles')], },