diff options
author | Hailey <me@haileyok.com> | 2024-02-19 13:30:25 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-19 13:30:25 -0800 |
commit | 5573c38c4dcf05489ff64abcf0017f7b65f18fee (patch) | |
tree | becd8f06f26ffe0e3d3d6d894da75aa040480118 /src/screens/Onboarding/StepTopicalFeeds.tsx | |
parent | 943acd16aac187ed4eb5f9cea67d6c507aab1ab5 (diff) | |
download | voidsky-5573c38c4dcf05489ff64abcf0017f7b65f18fee.tar.zst |
Update IS_PROD check (#2930)
* update is_prod check * remove unused constants * rename `IS_PROD` function to `IS_PROD_SERVICE`
Diffstat (limited to 'src/screens/Onboarding/StepTopicalFeeds.tsx')
-rw-r--r-- | src/screens/Onboarding/StepTopicalFeeds.tsx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/screens/Onboarding/StepTopicalFeeds.tsx b/src/screens/Onboarding/StepTopicalFeeds.tsx index 4a2210853..636565e34 100644 --- a/src/screens/Onboarding/StepTopicalFeeds.tsx +++ b/src/screens/Onboarding/StepTopicalFeeds.tsx @@ -3,7 +3,6 @@ import {View} from 'react-native' import {useLingui} from '@lingui/react' import {msg, Trans} from '@lingui/macro' -import {IS_PROD} from '#/env' import {atoms as a} from '#/alf' import {ChevronRight_Stroke2_Corner0_Rounded as ChevronRight} from '#/components/icons/Chevron' import {ListMagnifyingGlass_Stroke2_Corner0_Rounded as ListMagnifyingGlass} from '#/components/icons/ListMagnifyingGlass' @@ -22,21 +21,28 @@ import { import {FeedCard} from '#/screens/Onboarding/StepAlgoFeeds/FeedCard' import {aggregateInterestItems} from '#/screens/Onboarding/util' import {IconCircle} from '#/components/IconCircle' +import {IS_PROD_SERVICE} from 'lib/constants' +import {useSession} from 'state/session' export function StepTopicalFeeds() { const {_} = useLingui() const {track} = useAnalytics() + const {currentAccount} = useSession() const {state, dispatch, interestsDisplayNames} = React.useContext(Context) const [selectedFeedUris, setSelectedFeedUris] = React.useState<string[]>([]) const [saving, setSaving] = React.useState(false) const suggestedFeedUris = React.useMemo(() => { - if (!IS_PROD) return [] + if (!IS_PROD_SERVICE(currentAccount?.service)) return [] return aggregateInterestItems( state.interestsStepResults.selectedInterests, state.interestsStepResults.apiResponse.suggestedFeedUris, state.interestsStepResults.apiResponse.suggestedFeedUris.default, ).slice(0, 10) - }, [state.interestsStepResults]) + }, [ + currentAccount?.service, + state.interestsStepResults.apiResponse.suggestedFeedUris, + state.interestsStepResults.selectedInterests, + ]) const interestsText = React.useMemo(() => { const i = state.interestsStepResults.selectedInterests.map( |