Skip to content

Commit 16de130

Browse files
committed
chore: updated sdk options config in provider
1 parent 6bccd33 commit 16de130

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

apps/web/app/providers.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import { FlagixProvider } from "@flagix/react";
44
import { Toaster } from "@flagix/ui/components/sonner";
55
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
6+
import { env } from "@/config/env";
67

78
const queryClient = new QueryClient({
89
defaultOptions: {
@@ -14,8 +15,8 @@ const queryClient = new QueryClient({
1415
});
1516

1617
const SDK_OPTIONS = {
17-
apiKey: "44f19025-072d-4e7c-b24e-3d27aa95b95b",
18-
apiBaseUrl: "http://localhost:5000",
18+
apiKey: env.FLAGIX_SDK_API_KEY as string,
19+
apiBaseUrl: env.FLAGIX_SDK_BASE_URL as string,
1920
initialContext: {
2021
sessionId: "session-12345",
2122
platform: "web",

apps/web/config/env.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
export const env = {
22
apiBase: process.env.NEXT_PUBLIC_API_URL,
33
appBase: process.env.NEXT_PUBLIC_APP_URL,
4+
FLAGIX_SDK_API_KEY: process.env.FLAGIX_SDK_API_KEY,
5+
FLAGIX_SDK_BASE_URL: process.env.FLAGIX_SDK_BASE_URL,
46
};

0 commit comments

Comments
 (0)