File tree 4 files changed +54
-13
lines changed
4 files changed +54
-13
lines changed Original file line number Diff line number Diff line change @@ -16,13 +16,13 @@ import { accessTokenAtom } from "@/globalState";
16
16
import { authSocialAPI } from "@/apis" ;
17
17
18
18
import Logo from "@/assets/main/logo.png" ;
19
- import { Row } from "@/components/Layouts" ;
19
+ import { Column , Row } from "@/components/Layouts" ;
20
20
import { Button } from "@/components/Design" ;
21
21
import { WhatIF } from "@/components/Utilities" ;
22
- import { LoginButton } from "./private" ;
22
+ import { LoginButton , LoggedIn } from "./private" ;
23
23
24
24
export default function Header ( { } : { } ) {
25
- const { isLoggedIn, logout } = useAuth ( ) ;
25
+ const { isLoggedIn } = useAuth ( ) ;
26
26
const router = useRouter ( ) ;
27
27
28
28
const [ accessToken , setAccessToken ] = useAtom ( accessTokenAtom ) ;
@@ -170,16 +170,7 @@ export default function Header({}: {}) {
170
170
</ Row . li >
171
171
}
172
172
>
173
- < Row . li >
174
- < Button . Text
175
- onClick = { logout }
176
- typoSize = "Head5"
177
- typoColor = "neutral_60"
178
- hoverTypoColor = "neutral_90"
179
- >
180
- 로그아웃
181
- </ Button . Text >
182
- </ Row . li >
173
+ < LoggedIn />
183
174
</ WhatIF >
184
175
</ Row . ul >
185
176
</ S . Container >
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Created on Sun Jun 02 2024
3
+ *
4
+ * Copyright (c) 2024 Your Company
5
+ */
6
+
7
+ import styled from "@emotion/styled" ;
8
+ import Image from "next/image" ;
9
+
10
+ import { Column , Row } from "@/components/Layouts" ;
11
+ import { useAuth } from "@/hooks" ;
12
+ import { Button } from "@/components/Design" ;
13
+
14
+ import woni_happy from "@/assets/woni/woni_happy.png" ;
15
+
16
+ export default function LoggedIn ( ) {
17
+ const { logout } = useAuth ( ) ;
18
+
19
+ return (
20
+ < Wrapper gap = { 12 } >
21
+ < Column gap = { 6 } >
22
+ < Button . Text
23
+ typoSize = "Head12"
24
+ typoColor = "neutral_50"
25
+ hoverTypoColor = "neutral_70"
26
+ >
27
+ 내 정보
28
+ </ Button . Text >
29
+ < Button . Text
30
+ typoSize = "Head12"
31
+ typoColor = "neutral_50"
32
+ onClick = { logout }
33
+ hoverTypoColor = "neutral_70"
34
+ >
35
+ 로그아웃
36
+ </ Button . Text >
37
+ </ Column >
38
+ < div css = { { position : "relative" , minWidth : "32px" , minHeight : "32px" } } >
39
+ < Image src = { woni_happy } alt = "woni_happy" fill quality = { 30 } />
40
+ </ div >
41
+ </ Wrapper >
42
+ ) ;
43
+ }
44
+
45
+ const Wrapper = styled ( Row . li ) `
46
+ border-radius: 20px;
47
+ border: 2px solid ${ ( { theme } ) => theme . color . primary_60 } ;
48
+ padding: 9px 14px;
49
+ ` ;
Original file line number Diff line number Diff line change 5
5
*/
6
6
7
7
export { default as LoginButton } from "./LoginButton" ;
8
+ export { default as LoggedIn } from "./LoggedIn" ;
You can’t perform that action at this time.
0 commit comments