-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Feat: amplify 로그인 구현, 라우팅 로그인 분기 완료 (#120)
- Loading branch information
1 parent
b2a82a3
commit 446b6a3
Showing
21 changed files
with
366 additions
and
502 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
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React from 'react'; | ||
import { useAuthenticator } from '@aws-amplify/ui-react'; | ||
import * as S from '@/styles/layout/layout.style'; | ||
|
||
interface Props { | ||
handleLogin: () => void; | ||
} | ||
|
||
const AuthenticationButton: React.FC<Props> = ({ handleLogin }) => { | ||
const { signOut } = useAuthenticator(); | ||
const { authStatus } = useAuthenticator(context => [context.authStatus]); | ||
|
||
return ( | ||
<> | ||
{authStatus !== 'authenticated' ? ( | ||
<S.Link onClick={handleLogin}>로그인</S.Link> | ||
) : ( | ||
<S.Link onClick={signOut}>로그아웃</S.Link> | ||
)} | ||
</> | ||
); | ||
}; | ||
|
||
export default AuthenticationButton; |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from 'react'; | ||
import { Text } from '@chakra-ui/react'; | ||
import logo from '@/../public/logo.svg'; | ||
import * as S from '@/styles/user/DefaultHeader.style'; | ||
|
||
function DefaultHeader() { | ||
return ( | ||
<S.HeaderContainer> | ||
<img src={logo} alt="로고" /> | ||
<Text fontSize="3xl" as="b" color="#37447E"> | ||
Past-Forward | ||
</Text> | ||
</S.HeaderContainer> | ||
); | ||
} | ||
|
||
export default DefaultHeader; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.