···4import {msg, Trans} from '@lingui/macro'
5import {useLingui} from '@lingui/react'
607import {logEvent} from '#/lib/statsig/statsig'
8import {isWeb} from '#/platform/detection'
9import {useModerationOpts} from '#/state/preferences/moderation-opts'
···13import {useSession} from '#/state/session'
14import {type Follow10ProgressGuide} from '#/state/shell/progress-guide'
15import {type ListMethods} from '#/view/com/util/List'
16-import {
17- popularInterests,
18- useInterestsDisplayNames,
19-} from '#/screens/Onboarding/state'
20import {
21 atoms as a,
22 native,
···4import {msg, Trans} from '@lingui/macro'
5import {useLingui} from '@lingui/react'
67+import {popularInterests, useInterestsDisplayNames} from '#/lib/interests'
8import {logEvent} from '#/lib/statsig/statsig'
9import {isWeb} from '#/platform/detection'
10import {useModerationOpts} from '#/state/preferences/moderation-opts'
···14import {useSession} from '#/state/session'
15import {type Follow10ProgressGuide} from '#/state/shell/progress-guide'
16import {type ListMethods} from '#/view/com/util/List'
000017import {
18 atoms as a,
19 native,
···1import React from 'react'
2import {type TextStyle, View, type ViewStyle} from 'react-native'
304import {capitalize} from '#/lib/strings/capitalize'
5-import {useInterestsDisplayNames} from '#/screens/Onboarding/state'
6import {atoms as a, native, useTheme} from '#/alf'
7import * as Toggle from '#/components/forms/Toggle'
8import {Text} from '#/components/Typography'
910-export function InterestButton({interest}: {interest: string}) {
11 const t = useTheme()
12 const interestsDisplayNames = useInterestsDisplayNames()
13 const ctx = Toggle.useItemContext()
···1import React from 'react'
2import {type TextStyle, View, type ViewStyle} from 'react-native'
34+import {type Interest, useInterestsDisplayNames} from '#/lib/interests'
5import {capitalize} from '#/lib/strings/capitalize'
06import {atoms as a, native, useTheme} from '#/alf'
7import * as Toggle from '#/components/forms/Toggle'
8import {Text} from '#/components/Typography'
910+export function InterestButton({interest}: {interest: Interest}) {
11 const t = useTheme()
12 const interestsDisplayNames = useInterestsDisplayNames()
13 const ctx = Toggle.useItemContext()
···10import {useQueryClient} from '@tanstack/react-query'
11import * as bcp47Match from 'bcp-47-match'
12013import {cleanError} from '#/lib/strings/errors'
14import {sanitizeHandle} from '#/lib/strings/handles'
15import {logger} from '#/logger'
···41import {List} from '#/view/com/util/List'
42import {FeedFeedLoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder'
43import {LoadMoreRetryBtn} from '#/view/com/util/LoadMoreRetryBtn'
44-import {
45- popularInterests,
46- useInterestsDisplayNames,
47-} from '#/screens/Onboarding/state'
48import {
49 StarterPackCard,
50 StarterPackCardSkeleton,
···10import {useQueryClient} from '@tanstack/react-query'
11import * as bcp47Match from 'bcp-47-match'
1213+import {popularInterests, useInterestsDisplayNames} from '#/lib/interests'
14import {cleanError} from '#/lib/strings/errors'
15import {sanitizeHandle} from '#/lib/strings/handles'
16import {logger} from '#/logger'
···42import {List} from '#/view/com/util/List'
43import {FeedFeedLoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder'
44import {LoadMoreRetryBtn} from '#/view/com/util/LoadMoreRetryBtn'
000045import {
46 StarterPackCard,
47 StarterPackCardSkeleton,
···3import {msg, Trans} from '@lingui/macro'
4import {useLingui} from '@lingui/react'
506import {Nux, useSaveNux} from '#/state/queries/nuxs'
7import {usePreferencesQuery} from '#/state/queries/preferences'
8-import {useInterestsDisplayNames} from '#/screens/Onboarding/state'
9import {atoms as a, useTheme} from '#/alf'
10import {Button, ButtonIcon, ButtonText} from '#/components/Button'
11import {Shapes_Stroke2_Corner0_Rounded as Shapes} from '#/components/icons/Shapes'
···3import {msg, Trans} from '@lingui/macro'
4import {useLingui} from '@lingui/react'
56+import {useInterestsDisplayNames} from '#/lib/interests'
7import {Nux, useSaveNux} from '#/state/queries/nuxs'
8import {usePreferencesQuery} from '#/state/queries/preferences'
09import {atoms as a, useTheme} from '#/alf'
10import {Button, ButtonIcon, ButtonText} from '#/components/Button'
11import {Shapes_Stroke2_Corner0_Rounded as Shapes} from '#/components/icons/Shapes'
···5import {useLingui} from '@lingui/react'
6import {type InfiniteData} from '@tanstack/react-query'
708import {logger} from '#/logger'
9import {usePreferencesQuery} from '#/state/queries/preferences'
10import {BlockDrawerGesture} from '#/view/shell/BlockDrawerGesture'
11-import {
12- popularInterests,
13- useInterestsDisplayNames,
14-} from '#/screens/Onboarding/state'
15import {useTheme} from '#/alf'
16import {atoms as a} from '#/alf'
17import {boostInterests, InterestTabs} from '#/components/InterestTabs'
···5import {useLingui} from '@lingui/react'
6import {type InfiniteData} from '@tanstack/react-query'
78+import {popularInterests, useInterestsDisplayNames} from '#/lib/interests'
9import {logger} from '#/logger'
10import {usePreferencesQuery} from '#/state/queries/preferences'
11import {BlockDrawerGesture} from '#/view/shell/BlockDrawerGesture'
000012import {useTheme} from '#/alf'
13import {atoms as a} from '#/alf'
14import {boostInterests, InterestTabs} from '#/components/InterestTabs'
+1-1
src/screens/Search/util/useSuggestedUsers.ts
···1import {useMemo} from 'react'
203import {useActorSearchPaginated} from '#/state/queries/actor-search'
4import {useGetSuggestedUsersQuery} from '#/state/queries/trending/useGetSuggestedUsersQuery'
5-import {useInterestsDisplayNames} from '#/screens/Onboarding/state'
67/**
8 * Conditional hook, used in case a user is a non-english speaker, in which
···1import {useMemo} from 'react'
23+import {useInterestsDisplayNames} from '#/lib/interests'
4import {useActorSearchPaginated} from '#/state/queries/actor-search'
5import {useGetSuggestedUsersQuery} from '#/state/queries/trending/useGetSuggestedUsersQuery'
067/**
8 * Conditional hook, used in case a user is a non-english speaker, in which
+7-29
src/screens/Settings/InterestsSettings.tsx
···6import {useQueryClient} from '@tanstack/react-query'
7import debounce from 'lodash.debounce'
8000009import {type CommonNavigatorParams} from '#/lib/routes/types'
10import {
11 preferencesQueryKey,
···17import {createSuggestedStarterPacksQueryKey} from '#/state/queries/useSuggestedStarterPacksQuery'
18import {useAgent} from '#/state/session'
19import * as Toast from '#/view/com/util/Toast'
20-import {useInterestsDisplayNames} from '#/screens/Onboarding/state'
21import {atoms as a, useGutters, useTheme} from '#/alf'
22import {Admonition} from '#/components/Admonition'
23import {Divider} from '#/components/Divider'
···160 onChange={onChangeInterests}
161 label={_(msg`Select your interests from the options below`)}>
162 <View style={[a.flex_row, a.flex_wrap, a.gap_sm]}>
163- {INTERESTS.map(interest => {
164 const name = interestsDisplayNames[interest]
165 if (!name) return null
166 return (
···178 )
179}
180181-export function InterestButton({interest}: {interest: string}) {
182 const t = useTheme()
183 const interestsDisplayNames = useInterestsDisplayNames()
184 const ctx = Toggle.useItemContext()
···230 </View>
231 )
232}
233-234-const INTERESTS = [
235- 'animals',
236- 'art',
237- 'books',
238- 'comedy',
239- 'comics',
240- 'culture',
241- 'dev',
242- 'education',
243- 'food',
244- 'gaming',
245- 'journalism',
246- 'movies',
247- 'music',
248- 'nature',
249- 'news',
250- 'pets',
251- 'photography',
252- 'politics',
253- 'science',
254- 'sports',
255- 'tech',
256- 'tv',
257- 'writers',
258-]
···6import {useQueryClient} from '@tanstack/react-query'
7import debounce from 'lodash.debounce'
89+import {
10+ type Interest,
11+ interests as allInterests,
12+ useInterestsDisplayNames,
13+} from '#/lib/interests'
14import {type CommonNavigatorParams} from '#/lib/routes/types'
15import {
16 preferencesQueryKey,
···22import {createSuggestedStarterPacksQueryKey} from '#/state/queries/useSuggestedStarterPacksQuery'
23import {useAgent} from '#/state/session'
24import * as Toast from '#/view/com/util/Toast'
025import {atoms as a, useGutters, useTheme} from '#/alf'
26import {Admonition} from '#/components/Admonition'
27import {Divider} from '#/components/Divider'
···164 onChange={onChangeInterests}
165 label={_(msg`Select your interests from the options below`)}>
166 <View style={[a.flex_row, a.flex_wrap, a.gap_sm]}>
167+ {allInterests.map(interest => {
168 const name = interestsDisplayNames[interest]
169 if (!name) return null
170 return (
···182 )
183}
184185+export function InterestButton({interest}: {interest: Interest}) {
186 const t = useTheme()
187 const interestsDisplayNames = useInterestsDisplayNames()
188 const ctx = Toggle.useItemContext()
···234 </View>
235 )
236}
00000000000000000000000000