-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: navbar로그아웃 기능 추가 * refactor: 로그아웃 flyout 스타일 오버라이딩 방식 변경 * feat: CDN URL수정 및 홈 화면 디자인 변경
- Loading branch information
Showing
17 changed files
with
390 additions
and
229 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
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,48 @@ | ||
@import '@/styles/globals'; | ||
@import '@/styles/mixins'; | ||
|
||
.container { | ||
display: flex; | ||
align-items: center; | ||
position: relative; | ||
|
||
// TODO: 일반 HTML요소는 100%로 사용이 가능하지만 | ||
// FlyoutMenu를 사용하면 불가능해짐 | ||
height: 68px; | ||
} | ||
|
||
.menu { | ||
@include pure-button; | ||
|
||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
width: 100%; | ||
height: 100%; | ||
|
||
span { | ||
color: $red-7; | ||
font-size: $font-2; | ||
font-weight: bolder; | ||
letter-spacing: 2px; | ||
} | ||
} | ||
|
||
.logoutList { | ||
position: absolute; | ||
top: 30px; | ||
right: 0; | ||
left: auto; | ||
z-index: 2; | ||
width: 120px; | ||
padding: 0; | ||
background: $white; | ||
border: 1px solid $gray-1; | ||
border-radius: 8px; | ||
box-shadow: 2px 2px 3px $gray-2; | ||
} | ||
|
||
// .logoutList { | ||
// right: 0 !important; | ||
// left: auto !important; | ||
// } |
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,51 @@ | ||
'use client'; | ||
|
||
import FlyoutMenu from '@/app/_components/_modules/FlyoutMenu'; | ||
import useToggle from '@/app/_hooks/useToggle'; | ||
import styles from './LogoutIcon.module.scss'; | ||
import { useRouter } from 'next/navigation'; | ||
|
||
const LogoutIcon = () => { | ||
const flyout = useToggle(); | ||
const router = useRouter(); | ||
|
||
const logout = async () => { | ||
// await fetch(`${ROUTE_HANDLER_BASE_URL}/api/get/logout`, { | ||
// method: 'GET', | ||
// }); | ||
router.push(`/logout`); | ||
router.refresh(); | ||
}; | ||
|
||
return ( | ||
<div className={styles.container}> | ||
<FlyoutMenu context={flyout}> | ||
<FlyoutMenu.ToggleButton> | ||
<i> | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="30" | ||
height="30" | ||
viewBox="0 0 30 30" | ||
fill="none" | ||
> | ||
<path | ||
d="M15 15C19.1438 15 22.5 11.6438 22.5 7.5C22.5 3.35625 19.1438 0 15 0C10.8562 0 7.5 3.35625 7.5 7.5C7.5 11.6438 10.8562 15 15 15ZM15 18.75C9.99375 18.75 0 21.2625 0 26.25V30H30V26.25C30 21.2625 20.0063 18.75 15 18.75Z" | ||
fill="#BFBFBF" | ||
/> | ||
</svg> | ||
</i> | ||
</FlyoutMenu.ToggleButton> | ||
<FlyoutMenu.MenuList className={styles.logoutList}> | ||
<FlyoutMenu.MenuItem> | ||
<button className={styles.menu} onClick={logout}> | ||
<span>로그아웃</span> | ||
</button> | ||
</FlyoutMenu.MenuItem> | ||
</FlyoutMenu.MenuList> | ||
</FlyoutMenu> | ||
</div> | ||
); | ||
}; | ||
|
||
export default LogoutIcon; |
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 |
---|---|---|
|
@@ -120,6 +120,7 @@ | |
padding: 20px; | ||
border: 1px solid $gray-1; | ||
border-radius: 15px; | ||
background-color: white; | ||
} | ||
} | ||
|
||
|
Oops, something went wrong.