Skip to content

Commit cb54a8a

Browse files
committed
fix: Wait for /api/v2/user cache to expire prior to redirecting
1 parent 4183a4e commit cb54a8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

site/components/SignIn/SignInForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export const SignInForm: React.FC<SignInProps> = ({
8787
try {
8888
await loginHandler(email, password)
8989
// Tell SWR to invalidate the cache for the user endpoint
90-
mutate("/api/v2/user")
90+
await mutate("/api/v2/user")
9191
router.push("/")
9292
} catch (err) {
9393
helpers.setFieldError("password", "The username or password is incorrect.")

0 commit comments

Comments
 (0)