mirror of
https://github.com/TheRealOwenRees/echecsfrance.git
synced 2026-07-23 04:26:57 +00:00
Update the README
This commit is contained in:
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user