From eb67177ec678c351ee30123c3442250244d241e3 Mon Sep 17 00:00:00 2001 From: JAEMOONLEE Date: Tue, 26 Sep 2023 13:53:55 +0900 Subject: [PATCH] =?UTF-8?q?[feat]=20User=20Profile=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/Modal/ModalBox.tsx | 2 +- components/ProfileCard/index.tsx | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/components/Modal/ModalBox.tsx b/components/Modal/ModalBox.tsx index e21753b..780c987 100644 --- a/components/Modal/ModalBox.tsx +++ b/components/Modal/ModalBox.tsx @@ -82,7 +82,7 @@ function Modal({ let result =
; // TODO 나중에 여기 layoutHeader쪽 Component를 받는 거로 변경 if (customHeader) { - result =
; + result =
; } return result; }; diff --git a/components/ProfileCard/index.tsx b/components/ProfileCard/index.tsx index dee5dde..23e9610 100644 --- a/components/ProfileCard/index.tsx +++ b/components/ProfileCard/index.tsx @@ -7,6 +7,8 @@ import Logout from '@/public/icons/LogOut.svg'; import Vector from '@/public/icons/Vector 115.svg'; import { useRouter } from 'next/router'; +import useModal from '@/hooks/useModal.ts'; + interface ProfileCardProps { name : string; age: number; @@ -25,11 +27,24 @@ export default function ProfileCard({ name, age, gender, imageSrc }: ProfileCard const { register } = useForm({ mode: 'onChange' }); const [hoveredIndex, setHoveredIndex] = useState(null); const router = useRouter(); + const { openModal, closeModal } = useModal(); const handleRouting = (route: string) => { router.push(route); } + const handleProfileEdit = () => { + openModal({ + props: { + title: 'Edit profile', + size: 'full', + custom: true, + customHeader: true, + }, + children:
hi
, + }); + } + const ListItem = ({ IconComponent, text, route, index }: ListItemProps) => (
{age} years old | {gender}
- +