From 6b8171fcd69a549a3d75cc20235b975635441cb9 Mon Sep 17 00:00:00 2001 From: uche789 <3889297+uche789@users.noreply.github.com> Date: Fri, 8 Nov 2024 17:26:33 +0100 Subject: [PATCH] fix --- src/pages/PracticePage.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/pages/PracticePage.tsx b/src/pages/PracticePage.tsx index 191044d8..072eb1e8 100644 --- a/src/pages/PracticePage.tsx +++ b/src/pages/PracticePage.tsx @@ -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 = { @@ -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: [], @@ -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` } ] } @@ -45,7 +44,7 @@ export default function Practice() { Practice { topics[getLangConfig(params.lang).langCode].length > 0 && - + } ;