Skip to content

Commit 5bc6428

Browse files
committed
wip: pass local env to next config and ReactRuntimeProvider
1 parent df5a169 commit 5bc6428

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

core/lib/makeswift/provider.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ export function MakeswiftProvider({
1313
siteVersion: SiteVersion | null;
1414
}) {
1515
return (
16-
<ReactRuntimeProvider runtime={runtime} siteVersion={siteVersion}>
16+
<ReactRuntimeProvider
17+
apiOrigin={process.env.NEXT_PUBLIC_MAKESWIFT_API_ORIGIN}
18+
appOrigin={process.env.NEXT_PUBLIC_MAKESWIFT_APP_ORIGIN}
19+
runtime={runtime}
20+
siteVersion={siteVersion}
21+
>
1722
<RootStyleRegistry enableCssReset={false}>{children}</RootStyleRegistry>
1823
</ReactRuntimeProvider>
1924
);

core/next.config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ import { client } from './client';
88
import { graphql } from './client/graphql';
99
import { cspHeader } from './lib/content-security-policy';
1010

11-
const withMakeswift = createWithMakeswift();
11+
const withMakeswift = createWithMakeswift({
12+
appOrigin: process.env.NEXT_PUBLIC_MAKESWIFT_APP_ORIGIN,
13+
});
1214
const withNextIntl = createNextIntlPlugin({
1315
experimental: {
1416
createMessagesDeclaration: './messages/en.json',

0 commit comments

Comments
 (0)