fix 로그인 시 즉시 반영 안되는 버그
This commit is contained in:
parent
487a8ade11
commit
63e9e18719
@ -3,7 +3,7 @@
|
||||
import { Suspense } from "react";
|
||||
import { useRouter, useSearchParams } from "next/navigation";
|
||||
import GoogleSignIn from "@/components/google-sign-in";
|
||||
import { signIn } from "@/lib/auth";
|
||||
import { setMe, signIn } from "@/lib/auth";
|
||||
import { useState } from "react";
|
||||
|
||||
function LoginForm() {
|
||||
@ -20,6 +20,8 @@ function LoginForm() {
|
||||
<GoogleSignIn onCredential={(credential) => {
|
||||
setError(null);
|
||||
signIn(credential)
|
||||
// 사이드바 배지와 목록이 같은 값을 보므로 여기서 넣어줘야 같이 바뀐다
|
||||
.then(setMe)
|
||||
.then(() => router.replace(next))
|
||||
.catch((failure) => setError((failure as Error).message));
|
||||
}} />
|
||||
|
||||
Loading…
Reference in New Issue
Block a user