-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #435 from Hongjw030/refactor/social-password-edit
[#427] 소셜 로그인인 경우 비밀번호 변경 탭이 안보이게 수정
- Loading branch information
Showing
5 changed files
with
40 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
import { signOut } from "next-auth/react"; | ||
import { SigninMethodAtom } from '@/store/state'; | ||
import { useAtom } from 'jotai'; | ||
import { signOut } from 'next-auth/react'; | ||
|
||
function SignOutButton() { | ||
const handleLogoutClick = () => { | ||
signOut({ callbackUrl: '/signin' }); | ||
}; | ||
|
||
return <button className="text-15 mobile:hidden" onClick={handleLogoutClick}>로그아웃</button>; | ||
const [_, setSigninMethod] = useAtom(SigninMethodAtom); | ||
|
||
const handleLogoutClick = () => { | ||
setSigninMethod(null); | ||
signOut({ callbackUrl: '/signin' }); | ||
}; | ||
|
||
return ( | ||
<button className="text-15 mobile:hidden" onClick={handleLogoutClick}> | ||
로그아웃 | ||
</button> | ||
); | ||
} | ||
|
||
export default SignOutButton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters