Skip to content

Commit

Permalink
chore: set baseUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
einaralex committed Jul 30, 2024
1 parent e8913fc commit b364c89
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 9 additions & 1 deletion apps/customer/components/App/Providers/Providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,22 @@ 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 (
<WagmiProvider config={config}>
<QueryClientProvider client={queryClient}>
<RainbowKitProvider>
<MoneriumProvider
clientId="f2cd22fa-2406-11ef-8cfc-fe34ee86fd51"
redirectUrl="http://localhost:3000/dashboard"
redirectUrl={`${baseUrl}/dashboard`}
environment="sandbox"
>
<StyleProviders>{children}</StyleProviders>
Expand Down
3 changes: 3 additions & 0 deletions apps/customer/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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')],
},
Expand Down

0 comments on commit b364c89

Please sign in to comment.