fix(auth): registration flow infinite loop and session state sync (#1199)
This commit is contained in:
parent
70b1b54dde
commit
a1844c8294
2 changed files with 5 additions and 4 deletions
|
|
@ -42,8 +42,8 @@ export default function Page() {
|
||||||
updateSession();
|
updateSession();
|
||||||
router.refresh();
|
router.refresh();
|
||||||
}
|
}
|
||||||
}, [state.status, router, updateSession]);
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
|
}, [state.status]);
|
||||||
const handleSubmit = (formData: FormData) => {
|
const handleSubmit = (formData: FormData) => {
|
||||||
setEmail(formData.get('email') as string);
|
setEmail(formData.get('email') as string);
|
||||||
formAction(formData);
|
formAction(formData);
|
||||||
|
|
|
||||||
|
|
@ -43,8 +43,9 @@ export default function Page() {
|
||||||
updateSession();
|
updateSession();
|
||||||
router.refresh();
|
router.refresh();
|
||||||
}
|
}
|
||||||
}, [state, router, updateSession]);
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
|
}, [state.status]);
|
||||||
|
|
||||||
const handleSubmit = (formData: FormData) => {
|
const handleSubmit = (formData: FormData) => {
|
||||||
setEmail(formData.get('email') as string);
|
setEmail(formData.get('email') as string);
|
||||||
formAction(formData);
|
formAction(formData);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue