[D1X] Onboarding interest display names (#4657)
* Translate interest names in onboarding * Add comment * Do it the normal way
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
import React from 'react'
|
||||
import {View, ViewStyle, TextStyle} from 'react-native'
|
||||
import {TextStyle, View, ViewStyle} from 'react-native'
|
||||
|
||||
import {useTheme, atoms as a, native} from '#/alf'
|
||||
import {capitalize} from '#/lib/strings/capitalize'
|
||||
import {useInterestsDisplayNames} from '#/screens/Onboarding/state'
|
||||
import {atoms as a, native, useTheme} from '#/alf'
|
||||
import * as Toggle from '#/components/forms/Toggle'
|
||||
import {Text} from '#/components/Typography'
|
||||
import {capitalize} from '#/lib/strings/capitalize'
|
||||
|
||||
import {Context} from '#/screens/Onboarding/state'
|
||||
|
||||
export function InterestButton({interest}: {interest: string}) {
|
||||
const t = useTheme()
|
||||
const {interestsDisplayNames} = React.useContext(Context)
|
||||
const interestsDisplayNames = useInterestsDisplayNames()
|
||||
const ctx = Toggle.useItemContext()
|
||||
|
||||
const styles = React.useMemo(() => {
|
||||
|
||||
@@ -15,7 +15,11 @@ import {
|
||||
OnboardingControls,
|
||||
TitleText,
|
||||
} from '#/screens/Onboarding/Layout'
|
||||
import {ApiResponseMap, Context} from '#/screens/Onboarding/state'
|
||||
import {
|
||||
ApiResponseMap,
|
||||
Context,
|
||||
useInterestsDisplayNames,
|
||||
} from '#/screens/Onboarding/state'
|
||||
import {InterestButton} from '#/screens/Onboarding/StepInterests/InterestButton'
|
||||
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
||||
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
||||
@@ -33,8 +37,9 @@ export function StepInterests() {
|
||||
const t = useTheme()
|
||||
const {gtMobile} = useBreakpoints()
|
||||
const {track} = useAnalytics()
|
||||
const interestsDisplayNames = useInterestsDisplayNames()
|
||||
|
||||
const {state, dispatch, interestsDisplayNames} = React.useContext(Context)
|
||||
const {state, dispatch} = React.useContext(Context)
|
||||
const [saving, setSaving] = React.useState(false)
|
||||
const [interests, setInterests] = React.useState<string[]>(
|
||||
state.interestsStepResults.selectedInterests.map(i => i),
|
||||
|
||||
Reference in New Issue
Block a user