FlagProvider() — supabase Function Reference
Architecture documentation for the FlagProvider() function in FlagProvider.tsx from the supabase codebase.
Entity Profile
Relationship Graph
Source Code
apps/docs/components/Flag/FlagProvider.tsx lines 5–33
const FlagProvider: FC<PropsWithChildren<{}>> = ({ children }) => {
const [store, setStore] = useState({})
const { Provider } = FlagContext
// useEffect(() => {
// getFlags()
// }, [])
// 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)
// }
// const client = createConfigCatClient(process.env.NEXT_PUBLIC_CONFIGCAT_SDK_KEY ?? '', {
// configChanged: setFlagValues,
// pollIntervalSeconds: 600,
// })
// await setFlagValues()
// }
return <Provider value={store}>{children}</Provider>
}
Domain
Subdomains
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free