Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
uche789 committed Nov 8, 2024
1 parent 3808e11 commit 6b8171f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/pages/PracticePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { useParams } from "react-router-dom";
import getLangConfig from "@/lib/langConfig";

export default function Practice() {
const state = useContext(GlobalContext);
const params = useParams()

const topics: Record<SupportedLanguages, Topic[]> = {
Expand All @@ -24,7 +23,7 @@ export default function Practice() {
lessonType: "",
title: "Vocabulary",
levels: new Set([]),
to: `/${state.langCode}/practice/vocabulary`
to: `/${getLangConfig(params.lang).langCode}/practice/vocabulary`
}
],
fr: [],
Expand All @@ -34,7 +33,7 @@ export default function Practice() {
lessonType: "",
title: "Vocabulary",
levels: new Set([]),
to: `/${state.langCode}/practice/vocabulary`
to: `/${getLangConfig(params.lang).langCode}/practice/vocabulary`
}
]
}
Expand All @@ -45,7 +44,7 @@ export default function Practice() {
<HeadingText>Practice</HeadingText>
{
topics[getLangConfig(params.lang).langCode].length > 0 &&
<TopicList topics={topics[getLangConfig(params.lang).langCode]} language={state.levelLanguage} />
<TopicList topics={topics[getLangConfig(params.lang).langCode]} language={getLangConfig(params.lang).levelLanguage} />
}

</article>;
Expand Down

0 comments on commit 6b8171f

Please sign in to comment.