tangled mirror of catsky-🐱 Soothing soft social-app fork with all the niche toggles! (Unofficial); for issues and PRs please put them on github:NekoDrone/catsky-social
···44import {msg, Trans} from '@lingui/macro'
55import {useLingui} from '@lingui/react'
6677+import {popularInterests, useInterestsDisplayNames} from '#/lib/interests'
78import {logEvent} from '#/lib/statsig/statsig'
89import {isWeb} from '#/platform/detection'
910import {useModerationOpts} from '#/state/preferences/moderation-opts'
···1314import {useSession} from '#/state/session'
1415import {type Follow10ProgressGuide} from '#/state/shell/progress-guide'
1516import {type ListMethods} from '#/view/com/util/List'
1616-import {
1717- popularInterests,
1818- useInterestsDisplayNames,
1919-} from '#/screens/Onboarding/state'
2017import {
2118 atoms as a,
2219 native,
···11import React from 'react'
22import {type TextStyle, View, type ViewStyle} from 'react-native'
3344+import {type Interest, useInterestsDisplayNames} from '#/lib/interests'
45import {capitalize} from '#/lib/strings/capitalize'
55-import {useInterestsDisplayNames} from '#/screens/Onboarding/state'
66import {atoms as a, native, useTheme} from '#/alf'
77import * as Toggle from '#/components/forms/Toggle'
88import {Text} from '#/components/Typography'
991010-export function InterestButton({interest}: {interest: string}) {
1010+export function InterestButton({interest}: {interest: Interest}) {
1111 const t = useTheme()
1212 const interestsDisplayNames = useInterestsDisplayNames()
1313 const ctx = Toggle.useItemContext()
···1010import {useQueryClient} from '@tanstack/react-query'
1111import * as bcp47Match from 'bcp-47-match'
12121313+import {popularInterests, useInterestsDisplayNames} from '#/lib/interests'
1314import {cleanError} from '#/lib/strings/errors'
1415import {sanitizeHandle} from '#/lib/strings/handles'
1516import {logger} from '#/logger'
···4142import {List} from '#/view/com/util/List'
4243import {FeedFeedLoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder'
4344import {LoadMoreRetryBtn} from '#/view/com/util/LoadMoreRetryBtn'
4444-import {
4545- popularInterests,
4646- useInterestsDisplayNames,
4747-} from '#/screens/Onboarding/state'
4845import {
4946 StarterPackCard,
5047 StarterPackCardSkeleton,
···33import {msg, Trans} from '@lingui/macro'
44import {useLingui} from '@lingui/react'
5566+import {useInterestsDisplayNames} from '#/lib/interests'
67import {Nux, useSaveNux} from '#/state/queries/nuxs'
78import {usePreferencesQuery} from '#/state/queries/preferences'
88-import {useInterestsDisplayNames} from '#/screens/Onboarding/state'
99import {atoms as a, useTheme} from '#/alf'
1010import {Button, ButtonIcon, ButtonText} from '#/components/Button'
1111import {Shapes_Stroke2_Corner0_Rounded as Shapes} from '#/components/icons/Shapes'
···55import {useLingui} from '@lingui/react'
66import {type InfiniteData} from '@tanstack/react-query'
7788+import {popularInterests, useInterestsDisplayNames} from '#/lib/interests'
89import {logger} from '#/logger'
910import {usePreferencesQuery} from '#/state/queries/preferences'
1011import {BlockDrawerGesture} from '#/view/shell/BlockDrawerGesture'
1111-import {
1212- popularInterests,
1313- useInterestsDisplayNames,
1414-} from '#/screens/Onboarding/state'
1512import {useTheme} from '#/alf'
1613import {atoms as a} from '#/alf'
1714import {boostInterests, InterestTabs} from '#/components/InterestTabs'
+1-1
src/screens/Search/util/useSuggestedUsers.ts
···11import {useMemo} from 'react'
2233+import {useInterestsDisplayNames} from '#/lib/interests'
34import {useActorSearchPaginated} from '#/state/queries/actor-search'
45import {useGetSuggestedUsersQuery} from '#/state/queries/trending/useGetSuggestedUsersQuery'
55-import {useInterestsDisplayNames} from '#/screens/Onboarding/state'
6677/**
88 * Conditional hook, used in case a user is a non-english speaker, in which
+7-29
src/screens/Settings/InterestsSettings.tsx
···66import {useQueryClient} from '@tanstack/react-query'
77import debounce from 'lodash.debounce'
8899+import {
1010+ type Interest,
1111+ interests as allInterests,
1212+ useInterestsDisplayNames,
1313+} from '#/lib/interests'
914import {type CommonNavigatorParams} from '#/lib/routes/types'
1015import {
1116 preferencesQueryKey,
···1722import {createSuggestedStarterPacksQueryKey} from '#/state/queries/useSuggestedStarterPacksQuery'
1823import {useAgent} from '#/state/session'
1924import * as Toast from '#/view/com/util/Toast'
2020-import {useInterestsDisplayNames} from '#/screens/Onboarding/state'
2125import {atoms as a, useGutters, useTheme} from '#/alf'
2226import {Admonition} from '#/components/Admonition'
2327import {Divider} from '#/components/Divider'
···160164 onChange={onChangeInterests}
161165 label={_(msg`Select your interests from the options below`)}>
162166 <View style={[a.flex_row, a.flex_wrap, a.gap_sm]}>
163163- {INTERESTS.map(interest => {
167167+ {allInterests.map(interest => {
164168 const name = interestsDisplayNames[interest]
165169 if (!name) return null
166170 return (
···178182 )
179183}
180184181181-export function InterestButton({interest}: {interest: string}) {
185185+export function InterestButton({interest}: {interest: Interest}) {
182186 const t = useTheme()
183187 const interestsDisplayNames = useInterestsDisplayNames()
184188 const ctx = Toggle.useItemContext()
···230234 </View>
231235 )
232236}
233233-234234-const INTERESTS = [
235235- 'animals',
236236- 'art',
237237- 'books',
238238- 'comedy',
239239- 'comics',
240240- 'culture',
241241- 'dev',
242242- 'education',
243243- 'food',
244244- 'gaming',
245245- 'journalism',
246246- 'movies',
247247- 'music',
248248- 'nature',
249249- 'news',
250250- 'pets',
251251- 'photography',
252252- 'politics',
253253- 'science',
254254- 'sports',
255255- 'tech',
256256- 'tv',
257257- 'writers',
258258-]