Skip to content

Commit

Permalink
fix :: 코멘트 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
KANGYONGSU23 committed Nov 27, 2023
1 parent 30af9c0 commit b789bcd
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 49 deletions.
4 changes: 2 additions & 2 deletions src/components/company/CompanyTitle.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { GetCompanyKebabItems } from "@/util/object/kebabMenuItems";
import { getCompanyKebabItems } from "@/util/object/kebabMenuItems";
import { KebabItemType } from "@/util/type/kebabMenu";
import Image from "next/image";
import KebabMenu from "../common/Dropdown/KebabMenu";
Expand All @@ -22,7 +22,7 @@ export default function CompanyTitle({
onClickInterview,
children,
}: PropsType) {
const kebabItems = GetCompanyKebabItems(
const kebabItems = getCompanyKebabItems(
onClickRecruitments,
onClickInterview
);
Expand Down
4 changes: 2 additions & 2 deletions src/components/mypage/DetailProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { MyProfile } from "@/apis/students";
import { departmentEnum } from "@/util/object/enum";
import { mypageKebabItems } from "@/util/object/kebabMenuItems";
import { getMypageKebabItems } from "@/util/object/kebabMenuItems";
import Image from "next/image";
import KebabMenu from "../common/Dropdown/KebabMenu";
import GhostTag from "./GhostTag";
Expand Down Expand Up @@ -33,7 +33,7 @@ export default function DetailProfile() {
{profile && departmentEnum[profile.department]}
</p>
</div>
<KebabMenu items={mypageKebabItems} />
<KebabMenu items={getMypageKebabItems()} />
</div>
);
}
87 changes: 42 additions & 45 deletions src/util/object/kebabMenuItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,56 +3,53 @@ import { useRouter } from "next/navigation";
import { Cookies } from "react-cookie";
import { KebabItemType } from "../type/kebabMenu";

export const mypageKebabItems: KebabItemType[] = [
{
label: "프로필 수정",
onClick: () => {
const { append } = useToastStore();
append({
title: "",
message: "개발 중인 기능입니다.",
type: "YELLOW",
});
export const getMypageKebabItems = (): KebabItemType[] => {
const { append } = useToastStore();
const navigator = useRouter();
const cookies = new Cookies();
return [
{
label: "프로필 수정",
onClick: () => {
append({
title: "",
message: "개발 중인 기능입니다.",
type: "YELLOW",
});
},
},
},
{
label: "비밀변호 변경",
onClick: () => {
const { append } = useToastStore();

append({
title: "",
message: "개발 중인 기능입니다.",
type: "YELLOW",
});
{
label: "비밀변호 변경",
onClick: () => {
append({
title: "",
message: "개발 중인 기능입니다.",
type: "YELLOW",
});
},
},
},
{
label: "버그 제보하기",
onClick: () => {
const { append } = useToastStore();

append({
title: "",
message: "개발 중인 기능입니다.",
type: "YELLOW",
});
{
label: "버그 제보하기",
onClick: () => {
append({
title: "",
message: "개발 중인 기능입니다.",
type: "YELLOW",
});
},
},
},
{
label: "로그아웃",
onClick: () => {
const navigator = useRouter();
const cookies = new Cookies();

navigator.push("/account/login");
cookies.remove("access_token");
cookies.remove("refresh_token");
{
label: "로그아웃",
onClick: () => {
navigator.push("/account/login");
cookies.remove("access_token");
cookies.remove("refresh_token");
},
},
},
];
];
};

export const GetCompanyKebabItems = (
export const getCompanyKebabItems = (
onClickRecruitments?: () => void,
onClickInterview?: () => void
): KebabItemType[] => {
Expand Down

0 comments on commit b789bcd

Please sign in to comment.