chore: add landing page redirect flag (#5724)

* chore: add landing page redirect flag

* unused

* fix
This commit is contained in:
Vignesh Mohankumar 2022-12-19 13:38:03 -05:00 committed by GitHub
parent 7a5b855097
commit 6282298d13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 0 deletions

@ -1,4 +1,5 @@
import { BaseVariant, FeatureFlag, featureFlagSettings, useUpdateFlag } from 'featureFlags'
import { LandingRedirectVariant, useLandingRedirectFlag } from 'featureFlags/flags/landingRedirect'
import { Permit2Variant, usePermit2Flag } from 'featureFlags/flags/permit2'
import { TraceJsonRpcVariant, useTraceJsonRpcFlag } from 'featureFlags/flags/traceJsonRpc'
import { useAtomValue, useUpdateAtom } from 'jotai/utils'
@ -208,6 +209,12 @@ export default function FeatureFlagModal() {
featureFlag={FeatureFlag.permit2}
label="Permit 2 / Universal Router"
/>
<FeatureFlagOption
variant={LandingRedirectVariant}
value={useLandingRedirectFlag()}
featureFlag={FeatureFlag.landingRedirect}
label="Landing Page Redirect"
/>
<FeatureFlagGroup name="Debug">
<FeatureFlagOption
variant={TraceJsonRpcVariant}

@ -1,4 +1,5 @@
export enum FeatureFlag {
traceJsonRpc = 'traceJsonRpc',
permit2 = 'permit2',
landingRedirect = 'landingRedirect',
}

@ -0,0 +1,7 @@
import { BaseVariant, FeatureFlag, useBaseFlag } from '../index'
export function useLandingRedirectFlag(): BaseVariant {
return useBaseFlag(FeatureFlag.landingRedirect)
}
export { BaseVariant as LandingRedirectVariant }