-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: data fetching refacting, 내프로필 수정 버튼 추가 (#35)
- Loading branch information
Showing
9 changed files
with
128 additions
and
86 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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
9 changes: 9 additions & 0 deletions
9
src/app/(userpage)/user/[userId]/components/MyProfileButton/MyProfileButton.module.scss
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,9 @@ | ||
@import "@/styles/_index"; | ||
@import "@/styles/_media"; | ||
|
||
.container { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 20px; | ||
width: 100%; | ||
} |
28 changes: 28 additions & 0 deletions
28
src/app/(userpage)/user/[userId]/components/MyProfileButton/MyProfileButton.tsx
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,28 @@ | ||
import React, { useState } from "react"; | ||
import Button from "@/components/Button/Button"; | ||
import Modal from "@/components/Modal/Modal"; | ||
import cn from "@/utils/classNames"; | ||
import styles from "./MyProfileButton.module.scss"; | ||
|
||
export default function MyProfileButton() { | ||
const [isModal, setIsModal] = useState(false); | ||
const handleClose = () => setIsModal(false); | ||
const handleOpen = () => setIsModal(true); | ||
|
||
return ( | ||
<div className={cn(styles.container)}> | ||
{isModal && ( | ||
<Modal onClose={handleClose}> | ||
<div className={styles.profileEdit}>모달 테스트</div> | ||
</Modal> | ||
)} | ||
<Button | ||
styleType='primary' | ||
onClick={handleOpen} | ||
> | ||
프로필 수정 | ||
</Button> | ||
<Button styleType='tertiary'>로그아웃</Button> | ||
</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
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