-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2853210
commit 4722c3b
Showing
12 changed files
with
137 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
import DetailProfile from "@/components/mypage/DetailProfile"; | ||
|
||
export default function MyPage() { | ||
return <>mypage</>; | ||
return ( | ||
<> | ||
<DetailProfile /> | ||
</> | ||
); | ||
} |
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,87 @@ | ||
"use client"; | ||
|
||
import { MyProfile } from "@/apis/students"; | ||
import { departmentEnum } from "@/util/object/enum"; | ||
import { KebabItemType } from "@/util/type/kebabMenu"; | ||
import { useToastStore } from "@team-return/design-system"; | ||
import Image from "next/image"; | ||
import { useRouter } from "next/navigation"; | ||
import { Cookies } from "react-cookie"; | ||
import KebabMenu from "../common/Dropdown/KebabMenu"; | ||
import GhostTag from "./GhostTag"; | ||
|
||
export default function DetailProfile() { | ||
const { append } = useToastStore(); | ||
const navigator = useRouter(); | ||
const cookies = new Cookies(); | ||
|
||
const { data: profile } = MyProfile(); | ||
|
||
const kebabItems: KebabItemType[] = [ | ||
{ | ||
label: "프로필 수정", | ||
onClick: () => { | ||
append({ | ||
title: "", | ||
message: "개발 중인 기능입니다.", | ||
type: "YELLOW", | ||
}); | ||
}, | ||
}, | ||
{ | ||
label: "비밀변호 변경", | ||
onClick: () => { | ||
append({ | ||
title: "", | ||
message: "개발 중인 기능입니다.", | ||
type: "YELLOW", | ||
}); | ||
}, | ||
}, | ||
{ | ||
label: "버그 제보하기", | ||
onClick: () => { | ||
append({ | ||
title: "", | ||
message: "개발 중인 기능입니다.", | ||
type: "YELLOW", | ||
}); | ||
}, | ||
}, | ||
{ | ||
label: "로그아웃", | ||
onClick: () => { | ||
navigator.push("/account/login"); | ||
cookies.remove("access_token"); | ||
cookies.remove("refresh_token"); | ||
}, | ||
}, | ||
]; | ||
|
||
return ( | ||
<div className="flex items-center gap-6 px-[9vw]"> | ||
<div className="w-[100px] h-[100px] rounded-[50%] shadow-elevaiton overflow-hidden flex items-center justify-center"> | ||
<Image | ||
width={100} | ||
height={100} | ||
src={ | ||
profile | ||
? `${process.env.NEXT_PUBLIC_IMAGE_URL}/${profile.profile_image_url}` | ||
: "" | ||
} | ||
alt="프로필 사진" | ||
/> | ||
</div> | ||
<div className="flex-1"> | ||
<div className="flex items-center gap-2"> | ||
<p className="text-h5 leading-h5 font-m">{profile?.student_name}</p> | ||
<GhostTag>{profile?.student_gcn}</GhostTag> | ||
</div> | ||
<p className="text-b3 leading-b3 font-r text-[#7F7F7F]"> | ||
{profile && departmentEnum[profile.department]} | ||
</p> | ||
</div> | ||
<KebabMenu items={kebabItems} /> | ||
</div> | ||
); | ||
} |
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,13 @@ | ||
interface PropsType { | ||
children?: string | number; | ||
} | ||
|
||
export default function GhostTag({ children }: PropsType) { | ||
return ( | ||
<div className="px-2 py-[2px] border border-[#18DB89] rounded-[100px] h-fit w-fit"> | ||
<p className="text-caption leading-caption font-m text-[#18DB89]"> | ||
{children} | ||
</p> | ||
</div> | ||
); | ||
} |
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
File renamed without changes.