Skip to content

Commit 955ae34

Browse files
committed
Use pickLang() also for topic language
1 parent 3828827 commit 955ae34

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/ui/screens/onboarding-pages/components/ClickableTopicBox.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Typography, Button } from '@mui/material';
33
import { HBox } from "@/ui/shared-components/LayoutBoxes";
44
import theme from "@/theme";
55
import { useLanguageStore } from '@/ui/storage/useLanguageStore';
6+
import { pickLang } from "@/ui/language/useTranslation";
67

78
const ClickableTopicBox = ({ topic, onClick }) => {
89
const language = useLanguageStore((state) => state.language);
@@ -36,7 +37,7 @@ const ClickableTopicBox = ({ topic, onClick }) => {
3637
}}
3738
>
3839
<Typography variant="body1" sx={{ whiteSpace: 'wrap' }}>
39-
{language === "de" ? topic.title.de : topic.title.en}
40+
{pickLang(topic.title, language, '')}
4041
</Typography>
4142
</Button>
4243
</HBox>

src/ui/screens/onboarding-pages/overview/OnboardingWelcomeOverview.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import RegularButton from '@/ui/shared-components/buttons/RegularButton';
77
import TimeIcon from '../components/TimeIcon';
88
import BenefitsIcon from '../components/BenefitsIcon';
99
import AppScreenWrapperContainer from '@/ui/shared-components/app-screen-wrapper/AppScreenWrapperContainer';
10+
import { pickLang } from "@/ui/language/useTranslation";
1011

1112
const OnboardingWelcomeOverviewView = ({
1213
t,
@@ -81,7 +82,7 @@ const OnboardingWelcomeOverviewView = ({
8182
}}>
8283
<VBox sx={{ gap: 2 }}>
8384
<Typography variant="h2">
84-
{language === "de" ? topic.title.de : topic.title.en}
85+
{pickLang(topic.title, language, '')}
8586
</Typography>
8687
<ul>
8788
{rps.map((rpTitle, i) => (

0 commit comments

Comments
 (0)