diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/statsig/gates.ts | 1 | ||||
-rw-r--r-- | src/state/ageAssurance/index.tsx | 12 | ||||
-rw-r--r-- | src/state/ageAssurance/useIsAgeAssuranceEnabled.ts | 7 |
3 files changed, 6 insertions, 14 deletions
diff --git a/src/lib/statsig/gates.ts b/src/lib/statsig/gates.ts index efd7d605a..3b1106480 100644 --- a/src/lib/statsig/gates.ts +++ b/src/lib/statsig/gates.ts @@ -1,6 +1,5 @@ export type Gate = // Keep this alphabetic please. - | 'age_assurance' | 'alt_share_icon' | 'debug_show_feedcontext' | 'debug_subscriptions' diff --git a/src/state/ageAssurance/index.tsx b/src/state/ageAssurance/index.tsx index 3451b1139..6cdd8d929 100644 --- a/src/state/ageAssurance/index.tsx +++ b/src/state/ageAssurance/index.tsx @@ -4,7 +4,6 @@ import {useQuery} from '@tanstack/react-query' import {networkRetry} from '#/lib/async/retry' import {useGetAndRegisterPushToken} from '#/lib/notifications/notifications' -import {useGate} from '#/lib/statsig/statsig' import {isNetworkError} from '#/lib/strings/errors' import { type AgeAssuranceAPIContextType, @@ -41,7 +40,6 @@ const AgeAssuranceAPIContext = createContext<AgeAssuranceAPIContextType>({ * performance. */ export function Provider({children}: {children: React.ReactNode}) { - const gate = useGate() const agent = useAgent() const {geolocation} = useGeolocation() const isAgeAssuranceEnabled = useIsAgeAssuranceEnabled() @@ -78,12 +76,10 @@ export function Provider({children}: {children: React.ReactNode}) { account: agent.session?.did, }) - if (gate('age_assurance')) { - await getAndRegisterPushToken({ - isAgeRestricted: - !!geolocation?.isAgeRestrictedGeo && data.status !== 'assured', - }) - } + await getAndRegisterPushToken({ + isAgeRestricted: + !!geolocation?.isAgeRestrictedGeo && data.status !== 'assured', + }) return data } catch (e) { diff --git a/src/state/ageAssurance/useIsAgeAssuranceEnabled.ts b/src/state/ageAssurance/useIsAgeAssuranceEnabled.ts index 06fe46d23..b020e3c57 100644 --- a/src/state/ageAssurance/useIsAgeAssuranceEnabled.ts +++ b/src/state/ageAssurance/useIsAgeAssuranceEnabled.ts @@ -1,14 +1,11 @@ import {useMemo} from 'react' -import {useGate} from '#/lib/statsig/statsig' import {useGeolocation} from '#/state/geolocation' export function useIsAgeAssuranceEnabled() { - const gate = useGate() const {geolocation} = useGeolocation() return useMemo(() => { - const enabled = gate('age_assurance') - return enabled && !!geolocation?.isAgeRestrictedGeo - }, [geolocation, gate]) + return !!geolocation?.isAgeRestrictedGeo + }, [geolocation]) } |