Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Comment out usage of configcat for docs site

Joshen Limaddbfc2638ce
diff --git a/apps/docs/components/Flag/FlagProvider.tsx b/apps/docs/components/Flag/FlagProvider.tsx
index 870b6ee435e..4cb3f362fa7 100644
--- a/apps/docs/components/Flag/FlagProvider.tsx
+++ b/apps/docs/components/Flag/FlagProvider.tsx
@@ -1,34 +1,33 @@
import { FC, useEffect, useState } from 'react'
-import createConfigCatClient from 'configcat-js'
+// import createConfigCatClient from 'configcat-js'
import FlagContext from './FlagContext'
const FlagProvider: FC = ({ children }) => {
const [store, setStore] = useState({})
-
const { Provider } = FlagContext
- useEffect(() => {
- getFlags()
- }, [])
+ // useEffect(() => {
+ // getFlags()
+ // }, [])
- const getFlags = async () => {
- const setFlagValues = async () => {
- const flagValues = await client.getAllValuesAsync()
- const flagStore: any = {}
+ // const getFlags = async () => {
+ // const setFlagValues = async () => {
+ // const flagValues = await client.getAllValuesAsync()
+ // const flagStore: any = {}
- flagValues.forEach((item: any) => {
- flagStore[item.settingKey] = item.settingValue
- })
- setStore(flagStore)
- }
+ // flagValues.forEach((item: any) => {
+ // flagStore[item.settingKey] = item.settingValue
+ // })
+ // setStore(flagStore)
+ // }
- const client = createConfigCatClient(process.env.NEXT_PUBLIC_CONFIGCAT_SDK_KEY ?? '', {
- configChanged: setFlagValues,
- pollIntervalSeconds: 600,
- })
+ // const client = createConfigCatClient(process.env.NEXT_PUBLIC_CONFIGCAT_SDK_KEY ?? '', {
+ // configChanged: setFlagValues,
+ // pollIntervalSeconds: 600,
+ // })
- await setFlagValues()
- }
+ // await setFlagValues()
+ // }
return <Provider value={store}>{children}</Provider>
}