From d6939820b98933d7de6fc0ab41ddce0af1b2e6f4 Mon Sep 17 00:00:00 2001 From: Julien Froidefond Date: Fri, 14 Feb 2025 22:06:15 +0100 Subject: [PATCH] fix(db); no more bug on switch connection --- src/components/auth/LoginForm.tsx | 1 + src/components/auth/RegisterForm.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/src/components/auth/LoginForm.tsx b/src/components/auth/LoginForm.tsx index a4c347c..21218fe 100644 --- a/src/components/auth/LoginForm.tsx +++ b/src/components/auth/LoginForm.tsx @@ -27,6 +27,7 @@ export function LoginForm({ from }: LoginFormProps) { try { await authService.login(email, password, remember); router.push(from || "/"); + router.refresh(); } catch (error) { setError(error as AuthError); } finally { diff --git a/src/components/auth/RegisterForm.tsx b/src/components/auth/RegisterForm.tsx index 4b05fba..c5c4e43 100644 --- a/src/components/auth/RegisterForm.tsx +++ b/src/components/auth/RegisterForm.tsx @@ -36,6 +36,7 @@ export function RegisterForm({ from }: RegisterFormProps) { try { await authService.register(email, password); router.push(from || "/"); + router.refresh(); } catch (error) { setError(error as AuthError); } finally {