mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 01:45:10 +03:00
18 lines
307 B
TypeScript
18 lines
307 B
TypeScript
import React, { ReactNode } from 'react'
|
|
import { useFlag } from '~/hooks/useFlag'
|
|
|
|
interface Props {
|
|
children: ReactNode
|
|
name: string
|
|
}
|
|
|
|
function Flag({ children, name }: Props) {
|
|
const flagValue = useFlag(name)
|
|
if (!flagValue) {
|
|
return null
|
|
}
|
|
return <>{children}</>
|
|
}
|
|
|
|
export default Flag
|