File tree Expand file tree Collapse file tree 2 files changed +7
-17
lines changed
Expand file tree Collapse file tree 2 files changed +7
-17
lines changed Original file line number Diff line number Diff line change 11import { useFeatureValue } from "@growthbook/growthbook-react"
2- import { ISOMER_ADMINS_AND_MIGRATORS_EMAILS } from "~prisma/constants"
32
4- import { useMe } from "~/features/me/api"
5- import { USE_NEW_SETTINGS_PAGE_FEATURE_KEY } from "~/lib/growthbook"
3+ import { IS_NEW_SETTINGS_PAGE_ENABLED_FEATURE_KEY } from "~/lib/growthbook"
64
7- export const useNewSettingsPage = ( ) => {
8- const {
9- me : { email } ,
10- } = useMe ( )
11-
12- const { enabledFor } = useFeatureValue < { enabledFor : string [ ] } > (
13- USE_NEW_SETTINGS_PAGE_FEATURE_KEY ,
14- { enabledFor : ISOMER_ADMINS_AND_MIGRATORS_EMAILS } ,
15- )
16-
17- return enabledFor . includes ( email )
18- }
5+ export const useNewSettingsPage = ( ) =>
6+ useFeatureValue < boolean > ( IS_NEW_SETTINGS_PAGE_ENABLED_FEATURE_KEY , false )
Original file line number Diff line number Diff line change @@ -4,12 +4,14 @@ export const SCHEDULED_PUBLISHING_SITES_FEATURE_KEY =
44 "scheduled-publishing-sites"
55export const BANNER_FEATURE_KEY = "isomer-next-banner"
66export const ISOMER_ADMIN_FEATURE_KEY = "isomer_admins"
7- export const USE_NEW_SETTINGS_PAGE_FEATURE_KEY = "use-new-settings-page"
7+ export const IS_NEW_SETTINGS_PAGE_ENABLED_FEATURE_KEY =
8+ "is-new-settings-page-enabled"
89export const CATEGORY_DROPDOWN_FEATURE_KEY = "category-dropdown"
910export const IS_SINGPASS_ENABLED_FEATURE_KEY = "is-singpass-enabled"
10- export const IS_SINGPASS_ENABLED_FEATURE_KEY_FALLBACK_VALUE = true
1111export const ENABLE_DATABASE_LAYOUT_FEATURE_KEY = "enable-database-layout"
1212
13+ export const IS_SINGPASS_ENABLED_FEATURE_KEY_FALLBACK_VALUE = true
14+
1315interface GetIsSingpassEnabledProps {
1416 gb : GrowthBook
1517}
You can’t perform that action at this time.
0 commit comments