From 69b6247f0a38e8f5fc96e7eef808e396a1a69d22 Mon Sep 17 00:00:00 2001 From: JAEMOONLEE Date: Wed, 27 Sep 2023 10:11:59 +0900 Subject: [PATCH] =?UTF-8?q?[feat]=20My=20->=20myPosting=20=EC=9D=BC?= =?UTF-8?q?=EB=8B=A8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/ProfileCard/index.tsx | 18 +++--- pages/{profile => userInfo}/editProfile.tsx | 15 ++--- pages/{profile => userInfo}/index.tsx | 0 pages/userInfo/myPostings.tsx | 71 +++++++++++++++++++++ public/icons/noPosting.svg | 9 +++ 5 files changed, 93 insertions(+), 20 deletions(-) rename pages/{profile => userInfo}/editProfile.tsx (94%) rename pages/{profile => userInfo}/index.tsx (100%) create mode 100644 pages/userInfo/myPostings.tsx create mode 100644 public/icons/noPosting.svg diff --git a/components/ProfileCard/index.tsx b/components/ProfileCard/index.tsx index f50717b..f1b49c1 100644 --- a/components/ProfileCard/index.tsx +++ b/components/ProfileCard/index.tsx @@ -1,13 +1,13 @@ import React, { useState } from 'react'; -import { Nav, Textarea } from '@/components/index.tsx'; -import EditProfile from '@/pages/profile/editProfile'; import { useForm } from 'react-hook-form'; +import { Nav, Textarea } from '@/components/index.tsx'; +import EditProfile from '@/pages/userInfo/editProfile'; + import MyPosting from '@/public/icons/myPosting.svg'; import ChangePassword from '@/public/icons/Password.svg'; 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 { @@ -49,10 +49,10 @@ export default function ProfileCard({ name, age, gender, imageSrc }: ProfileCard const ListItem = ({ IconComponent, text, route, index }: ListItemProps) => (
{ console.log('mouseover', index); setHoveredIndex(index)} } + onMouseOver ={() => { setHoveredIndex(index)} } onMouseOut={() => setHoveredIndex(null)} - onTouchStart={() => setHoveredIndex(index)} - onTouchEnd={() => setHoveredIndex(null)} + onTouchStart={() => setHoveredIndex(index)} + onTouchEnd={() => setHoveredIndex(null)} onClick={() => handleRouting(route)} >
@@ -64,12 +64,12 @@ export default function ProfileCard({ name, age, gender, imageSrc }: ProfileCard ); const items = [ - { IconComponent: MyPosting, text: "My postings", route: '/myPosting'}, + { IconComponent: MyPosting, text: "My postings", route: '/userInfo/myPostings'}, { IconComponent: ChangePassword, text: "Change password", route: '/resetPassword/step1'}, { IconComponent: Logout, text: "Log out", route: "/"}, ]; - function ListContainer() { + const ListContainer = () =>{ return (
{items.map((item, index) => ( @@ -94,7 +94,7 @@ export default function ProfileCard({ name, age, gender, imageSrc }: ProfileCard
-