diff --git a/src/screens/Onboarding/StepModeration/ModerationOption.tsx b/src/screens/Onboarding/StepModeration/ModerationOption.tsx index 740d7ce556..ac02a874cb 100644 --- a/src/screens/Onboarding/StepModeration/ModerationOption.tsx +++ b/src/screens/Onboarding/StepModeration/ModerationOption.tsx @@ -2,8 +2,7 @@ import React from 'react' import {View} from 'react-native' import {LabelPreference, InterpretedLabelValueDefinition} from '@atproto/api' import {useLingui} from '@lingui/react' -import {msg} from '@lingui/macro' -import Animated, {Easing, Layout, FadeIn} from 'react-native-reanimated' +import {msg, Trans} from '@lingui/macro' import { usePreferencesQuery, @@ -16,10 +15,10 @@ import {useGlobalLabelStrings} from '#/lib/moderation/useGlobalLabelStrings' export function ModerationOption({ labelValueDefinition, - isMounted, + disabled, }: { labelValueDefinition: InterpretedLabelValueDefinition - isMounted: React.MutableRefObject + disabled?: boolean }) { const {_} = useLingui() const t = useTheme() @@ -56,7 +55,7 @@ export function ModerationOption({ } return ( - + ]}> {labelStrings.name} {labelStrings.description} - - - - {labels.show} - - - {labels.warn} - - - {labels.hide} - - + + {disabled ? ( + + Hide + + ) : ( + + + {labels.show} + + + {labels.warn} + + + {labels.hide} + + + )} - + ) } diff --git a/src/screens/Onboarding/StepModeration/index.tsx b/src/screens/Onboarding/StepModeration/index.tsx index 8001f17175..9b52f9f439 100644 --- a/src/screens/Onboarding/StepModeration/index.tsx +++ b/src/screens/Onboarding/StepModeration/index.tsx @@ -2,12 +2,10 @@ import React from 'react' import {View} from 'react-native' import {useLingui} from '@lingui/react' import {msg, Trans} from '@lingui/macro' -import Animated, {Easing, Layout} from 'react-native-reanimated' import {LABELS} from '@atproto/api' import {atoms as a} from '#/alf' import {usePreferencesSetAdultContentMutation} from 'state/queries/preferences' -import {Divider} from '#/components/Divider' import {Button, ButtonIcon, ButtonText} from '#/components/Button' import {ChevronRight_Stroke2_Corner0_Rounded as ChevronRight} from '#/components/icons/Chevron' import {EyeSlash_Stroke2_Corner0_Rounded as EyeSlash} from '#/components/icons/EyeSlash' @@ -25,14 +23,6 @@ import {AdultContentEnabledPref} from '#/screens/Onboarding/StepModeration/Adult import {Context} from '#/screens/Onboarding/state' import {IconCircle} from '#/components/IconCircle' -function AnimatedDivider() { - return ( - - - - ) -} - export function StepModeration() { const {_} = useLingui() const {track} = useAnalytics() @@ -83,28 +73,19 @@ export function StepModeration() { - {adultContentEnabled && ( - <> - - - - - - - )} + + + )}