Add gate, add to other case

This commit is contained in:
Eric Bailey
2025-08-06 13:01:40 -05:00
parent 2073b92aa7
commit feeee26b52
2 changed files with 18 additions and 8 deletions
+1
View File
@@ -3,6 +3,7 @@ export type Gate =
| 'alt_share_icon' | 'alt_share_icon'
| 'debug_show_feedcontext' | 'debug_show_feedcontext'
| 'debug_subscriptions' | 'debug_subscriptions'
| 'disable_onboarding_policy_update_notice'
| 'explore_show_suggested_feeds' | 'explore_show_suggested_feeds'
| 'old_postonboarding' | 'old_postonboarding'
| 'onboarding_add_video_feed' | 'onboarding_add_video_feed'
+17 -8
View File
@@ -5,6 +5,7 @@ import {msg, Trans} from '@lingui/macro'
import {useLingui} from '@lingui/react' import {useLingui} from '@lingui/react'
import {webLinks} from '#/lib/constants' import {webLinks} from '#/lib/constants'
import {useGate} from '#/lib/statsig/statsig'
import {atoms as a, useTheme} from '#/alf' import {atoms as a, useTheme} from '#/alf'
import {Admonition} from '#/components/Admonition' import {Admonition} from '#/components/Admonition'
import {CircleInfo_Stroke2_Corner0_Rounded as CircleInfo} from '#/components/icons/CircleInfo' import {CircleInfo_Stroke2_Corner0_Rounded as CircleInfo} from '#/components/icons/CircleInfo'
@@ -13,6 +14,10 @@ import {Text} from '#/components/Typography'
function CommunityGuidelinesNotice({}: {}) { function CommunityGuidelinesNotice({}: {}) {
const {_} = useLingui() const {_} = useLingui()
const gate = useGate()
if (gate('disable_onboarding_policy_update_notice')) return null
return ( return (
<View style={[a.pt_xs]}> <View style={[a.pt_xs]}>
<Admonition type="info"> <Admonition type="info">
@@ -25,7 +30,7 @@ function CommunityGuidelinesNotice({}: {}) {
</InlineLinkText> </InlineLinkText>
. An{' '} . An{' '}
<InlineLinkText <InlineLinkText
label={_(msg`Bluesky's Community Guidelines`)} label={_(msg`Bluesky's Updated Community Guidelines`)}
to={webLinks.community}> to={webLinks.community}>
updated version of our Community Guidelines updated version of our Community Guidelines
</InlineLinkText>{' '} </InlineLinkText>{' '}
@@ -57,14 +62,18 @@ export const Policies = ({
if (!tos && !pp) { if (!tos && !pp) {
return ( return (
<View style={[a.flex_row, a.align_center, a.gap_xs]}> <View style={[a.gap_md]}>
<CircleInfo size="md" fill={t.atoms.text_contrast_low.color} /> <View style={[a.flex_row, a.align_center, a.gap_xs]}>
<CircleInfo size="md" fill={t.atoms.text_contrast_low.color} />
<Text style={[t.atoms.text_contrast_medium]}> <Text style={[t.atoms.text_contrast_medium]}>
<Trans> <Trans>
This service has not provided terms of service or a privacy policy. This service has not provided terms of service or a privacy
</Trans> policy.
</Text> </Trans>
</Text>
</View>
<CommunityGuidelinesNotice />
</View> </View>
) )
} }