fix(db); no more bug on switch connection
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user