fix(db); no more bug on switch connection

This commit is contained in:
Julien Froidefond
2025-02-14 22:06:15 +01:00
parent d7bed4df6d
commit d6939820b9
2 changed files with 2 additions and 0 deletions

View File

@@ -27,6 +27,7 @@ export function LoginForm({ from }: LoginFormProps) {
try { try {
await authService.login(email, password, remember); await authService.login(email, password, remember);
router.push(from || "/"); router.push(from || "/");
router.refresh();
} catch (error) { } catch (error) {
setError(error as AuthError); setError(error as AuthError);
} finally { } finally {

View File

@@ -36,6 +36,7 @@ export function RegisterForm({ from }: RegisterFormProps) {
try { try {
await authService.register(email, password); await authService.register(email, password);
router.push(from || "/"); router.push(from || "/");
router.refresh();
} catch (error) { } catch (error) {
setError(error as AuthError); setError(error as AuthError);
} finally { } finally {