Update the README

This commit is contained in:
Timothy Armes
2024-09-30 15:34:54 +02:00
parent 7c1aa60c3f
commit 8a6502d398
3 changed files with 33 additions and 3 deletions
@@ -21,9 +21,9 @@ export default function Footer() {
const params = useParams();
const { status } = useSession();
const changeLanguage = (lang: string) => {
const changeLanguage = async (lang: string) => {
// Store the user's locale preference if they're authenticated
if (status === "authenticated") setUserLocale(lang);
if (status === "authenticated") await setUserLocale(lang);
// Redirect to the same page with the new locale
router.push({ pathname, params: params as any }, { locale: lang });