Skip to content

Commit

Permalink
docs: header 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeSG98 committed Jun 13, 2024
1 parent a7a9b0d commit 300c24b
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions components/layout/Header/HeaderButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import { HeaderButtonsProps } from "../types/HeaderButton.types";
import { useRouter } from "next/router";
import { deleteCookie } from "@/hooks/useLogout";

export default function HeaderButtons({ userType, handleClickMovePage }: HeaderButtonsProps) {
export default function HeaderButtons({
userType,
handleClickMovePage,
}: HeaderButtonsProps) {
const router = useRouter();
return (
<div className={styles.headerButtons}>
Expand All @@ -26,20 +29,27 @@ export default function HeaderButtons({ userType, handleClickMovePage }: HeaderB
)}
{userType === "employer" && (
<>
<UiButton name="내 가게" handleClickButton={() => handleClickMovePage("my-shop")} />
<UiButton name="로그아웃" handleClickButton={() => handleClickMovePage("my-shop")} />
<UiButton
name="내 가게"
handleClickButton={() => handleClickMovePage("my-shop")}
/>
<UiButton
name="로그아웃"
handleClickButton={() => deleteCookie(router)}
/>
<NotiButton />
<UiButton name="내 가게" handleClickButton={() => handleClickMovePage("my-shop")} />
<UiButton name="로그아웃" handleClickButton={() => deleteCookie(router)} />
</>
)}
{userType === "employee" && (
<>
<UiButton name="내 프로필" handleClickButton={() => handleClickMovePage("my-profile")} />
<UiButton name="로그아웃" handleClickButton={() => handleClickMovePage("my-shop")} />
<NotiButton />
<UiButton name="내 프로필" handleClickButton={() => handleClickMovePage("my-profile")} />
<UiButton name="로그아웃" handleClickButton={() => deleteCookie(router)} />
<UiButton
name="내 프로필"
handleClickButton={() => handleClickMovePage("my-profile")}
/>
<UiButton
name="로그아웃"
handleClickButton={() => deleteCookie(router)}
/>
<NotiButton />
</>
)}
Expand Down

0 comments on commit 300c24b

Please sign in to comment.