From 15e6fa83dac75242a62df9397dc546764fa5d9e5 Mon Sep 17 00:00:00 2001 From: Sunami97 Date: Mon, 2 Dec 2024 15:15:04 +0900 Subject: [PATCH 1/4] =?UTF-8?q?fix:=20qfeed-85=20=EC=9D=B4=EB=AF=B8?= =?UTF-8?q?=EC=A7=80=20=EC=97=85=EB=A1=9C=EB=93=9C=20=EC=8A=A4=ED=83=80?= =?UTF-8?q?=EC=9D=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ui/ImageUpload/ImageUpload.styles.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ui/ImageUpload/ImageUpload.styles.ts b/src/components/ui/ImageUpload/ImageUpload.styles.ts index 7e746d5..c224958 100644 --- a/src/components/ui/ImageUpload/ImageUpload.styles.ts +++ b/src/components/ui/ImageUpload/ImageUpload.styles.ts @@ -16,7 +16,7 @@ export const UploadBox = styled.div<{ hasPreview: boolean }>` width: 100%; height: 16.25rem; border: ${({ hasPreview }) => (hasPreview ? '0.125rem solid' : '0.125rem dashed')}; - ${theme.colors.primary}; + color: ${theme.colors.primary}; border-radius: 1rem; background-color: #efe7de; position: relative; From 45b02fc7d8273a97f122ac89378201fbf88620a5 Mon Sep 17 00:00:00 2001 From: Sunami97 Date: Mon, 2 Dec 2024 15:15:40 +0900 Subject: [PATCH 2/4] =?UTF-8?q?feat:=20qfeed-85=20=ED=94=84=EB=A1=9C?= =?UTF-8?q?=ED=95=84=20=EB=8D=A4=ED=94=84=ED=8C=8C=EC=9D=BC=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mocks/dunmyMyProfile.ts | 57 +++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 src/mocks/dunmyMyProfile.ts diff --git a/src/mocks/dunmyMyProfile.ts b/src/mocks/dunmyMyProfile.ts new file mode 100644 index 0000000..0a9c989 --- /dev/null +++ b/src/mocks/dunmyMyProfile.ts @@ -0,0 +1,57 @@ +export const dummyProfile = { + name: '정주연', + id: 'juyeon123', + followers: 16, + following: 23, + bio: '숨은 맛집을 찾아다니는 주연씨입니다!', + profileImage: 'https://via.placeholder.com/100', + tags: ['여행', '패션', '맛집'], + answers: [ + { post: '나는 국내 여행으로도 만족이야', src: null }, + { + post: '따끈한 일본 온천으로 놀러가고싶어', + src: 'https://cdn.traveltimes.co.kr/news/photo/202411/410169_35552_1437.jpg', + }, + { + post: '여행은 무슨 집이 최고야야', + src: 'https://i.namu.wiki/i/_VR5WHEDuh8GTDefHS5Q9hRraEwIEwHVMMFNwzr3uDAgXeQ-2ht67CM8tj4KtttckiCj7-VOdzeOQnpSz7ks8w.webp', + }, + { + post: '태국 망고 먹고싶어', + src: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSrSHVl8viXH3OPR1UyFBqVdeF80pdytyDieQ&s', + }, + { + post: '대만가서 딤섬 먹고싶다', + src: 'https://i.namu.wiki/i/VJ3wVc3XFU2ksCFrU3TFUeG4vpB6SG0MivSNHN3jRM2SuAaM5MD018FNBV3QKQj9mKsvzL3Dnu17M0g_z35Wdg.webp', + }, + { + post: '라스베가스에 가서 잭팟을 노리겠어', + src: 'https://static.hanatour.com/product/2019/02/01/0055e0rtfv/default.jpg', + }, + ], +}; + +export const dummyQuestions = [ + { id: 1, date: '2024.11.15', content: '맛집을 고르는 기준은 무엇인가요?', isPrivate: true }, + { id: 2, date: '2024.11.15', content: '가장 좋아하는 운동은 무엇인가요?', isPrivate: false }, + { id: 3, date: '2024.11.15', content: '가장 기억에 남는 여행지는?', isPrivate: true }, +]; + +export const dummyQSpaces = [ + { + imageUrl: 'https://via.placeholder.com/150', + title: '제주도 맛집 토론방', + description: '제주의 숨은 맛집 이야기해요!', + memberCount: 133, + isRecruiting: true, + lastUpdated: '방금 전 게시', + }, + { + imageUrl: 'https://via.placeholder.com/150', + title: '서울 카페 탐방', + description: '서울의 멋진 카페를 공유해요!', + memberCount: 87, + isRecruiting: false, + lastUpdated: '3일 전 게시', + }, +]; \ No newline at end of file From 3bbfbbd4ef22832cb5f50c123aec025e123bd7ad Mon Sep 17 00:00:00 2001 From: Sunami97 Date: Mon, 2 Dec 2024 15:17:24 +0900 Subject: [PATCH 3/4] =?UTF-8?q?feat:=20qfeed-85=20=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=ED=84=B0=20=EB=8D=94=EB=AF=B8=ED=8C=8C=EC=9D=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=20=EB=84=A4=EB=B9=84=EA=B2=8C=EC=9D=B4?= =?UTF-8?q?=EC=85=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/MyProfile/MyProfile.styles.tsx | 1 + src/pages/MyPage/index.tsx | 43 +++---------------- src/pages/Profile/index.tsx | 42 +++--------------- src/pages/Profile/styles.ts | 1 + src/pages/ProfileEdit/index.tsx | 10 +++-- src/pages/Question/index.tsx | 6 ++- 6 files changed, 24 insertions(+), 79 deletions(-) diff --git a/src/pages/MyPage/components/MyProfile/MyProfile.styles.tsx b/src/pages/MyPage/components/MyProfile/MyProfile.styles.tsx index e98def5..e2b6ea1 100644 --- a/src/pages/MyPage/components/MyProfile/MyProfile.styles.tsx +++ b/src/pages/MyPage/components/MyProfile/MyProfile.styles.tsx @@ -55,6 +55,7 @@ export const DetailItem = styled.div` display: flex; flex-direction: column; align-items: center; + cursor: pointer; `; export const DetailLabel = styled.span` diff --git a/src/pages/MyPage/index.tsx b/src/pages/MyPage/index.tsx index 969952e..19b1b15 100644 --- a/src/pages/MyPage/index.tsx +++ b/src/pages/MyPage/index.tsx @@ -1,9 +1,11 @@ import { useState } from 'react'; +import { useNavigate } from 'react-router-dom'; import Header from '@/pages/MyPage/components/Header/Header'; import QuestionCard from '@/pages/MyPage/components/QuestionCard/QuestionCard'; import Button from '@/pages/MyPage/components/Button/Button'; import MyProfile from '@/pages/MyPage/components/MyProfile/MyProfile'; import QSpaceCard from '@/components/ui/QSpaceCard/QSpaceCard'; +import { dummyProfile, dummyQuestions, dummyQSpaces } from '@/mocks/dunmyMyProfile'; import { ButtonGroup, Container, @@ -14,43 +16,8 @@ import { TabContainer, } from '@/pages/MyPage/styles'; -// 더미 데이터 -const dummyProfile = { - name: '정주연', - id: 'juyeon123', - followers: 16, - following: 23, - bio: '숨은 맛집을 찾아다니는 주연씨입니다!', - profileImage: 'https://via.placeholder.com/100', - tags: ['여행', '패션', '맛집'], -}; - -const dummyQuestions = [ - { id: 1, date: '2024.11.15', content: '맛집을 고르는 기준은 무엇인가요?', isPrivate: true }, - { id: 2, date: '2024.11.15', content: '가장 좋아하는 운동은 무엇인가요?', isPrivate: false }, - { id: 3, date: '2024.11.15', content: '가장 기억에 남는 여행지는?', isPrivate: true }, -]; - -const dummyQSpaces = [ - { - imageUrl: 'https://via.placeholder.com/150', - title: '제주도 맛집 토론방', - description: '제주의 숨은 맛집 이야기해요!', - memberCount: 133, - isRecruiting: true, - lastUpdated: '방금 전 게시', - }, - { - imageUrl: 'https://via.placeholder.com/150', - title: '서울 카페 탐방', - description: '서울의 멋진 카페를 공유해요!', - memberCount: 87, - isRecruiting: false, - lastUpdated: '3일 전 게시', - }, -]; - const MyPage = () => { + const navigate = useNavigate(); const [activeTab, setActiveTab] = useState<'myQuestions' | 'qSpace'>('myQuestions'); const [myQuestions, setMyQuestions] = useState(dummyQuestions); const profile = dummyProfile; @@ -71,8 +38,8 @@ const MyPage = () => { - - + + setActiveTab('myQuestions')} isActive={activeTab === 'myQuestions'}> diff --git a/src/pages/Profile/index.tsx b/src/pages/Profile/index.tsx index a483c10..bc7c2ae 100644 --- a/src/pages/Profile/index.tsx +++ b/src/pages/Profile/index.tsx @@ -1,3 +1,4 @@ +import { useNavigate } from 'react-router-dom'; import theme from '@/styles/theme'; import Header from '@/pages/MyPage/components/Header/Header'; import ProfileImage from '@/components/ui/ProfileImageCon/ProfileImageCon'; @@ -6,6 +7,7 @@ import PopularPostSlider from '@/pages/Main/components/PopularPostSlider/Popular import Tags from '@/pages/MyPage/components/Tags/Tags'; import { IoChatbubbleEllipsesOutline } from 'react-icons/io5'; import { FaShare } from 'react-icons/fa6'; +import { dummyProfile } from '@/mocks/dunmyMyProfile'; import { AnswerCounter, AnswerSection, @@ -25,43 +27,9 @@ import { TitleSection, } from '@/pages/Profile/styles'; -// 더미 데이터 -const dummyProfile = { - name: '정주연', - id: 'Chung Juyeon', - followers: 185, - following: 72, - bio: '안녕하세요, 여러분! 현재 푸드 칼럼리스트로 활동하고 있는 작가, 정주연입니다. 만나서 반가워요 꾸준히 소통해요 :)', - profileImage: 'https://via.placeholder.com/200', - tags: ['여행', '패션', '맛집'], - answers: [ - { post: '나는 국내 여행으로도 만족이야', src: null }, - { - post: '따끈한 일본 온천으로 놀러가고싶어', - src: 'https://cdn.traveltimes.co.kr/news/photo/202411/410169_35552_1437.jpg', - }, - { - post: '여행은 무슨 집이 최고야야', - src: 'https://i.namu.wiki/i/_VR5WHEDuh8GTDefHS5Q9hRraEwIEwHVMMFNwzr3uDAgXeQ-2ht67CM8tj4KtttckiCj7-VOdzeOQnpSz7ks8w.webp', - }, - { - post: '태국 망고 먹고싶어', - src: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSrSHVl8viXH3OPR1UyFBqVdeF80pdytyDieQ&s', - }, - { - post: '대만가서 딤섬 먹고싶다', - src: 'https://i.namu.wiki/i/VJ3wVc3XFU2ksCFrU3TFUeG4vpB6SG0MivSNHN3jRM2SuAaM5MD018FNBV3QKQj9mKsvzL3Dnu17M0g_z35Wdg.webp', - }, - { - post: '라스베가스에 가서 잭팟을 노리겠어', - src: 'https://static.hanatour.com/product/2019/02/01/0055e0rtfv/default.jpg', - }, - ], -}; - const ProfilePage = () => { + const navigate = useNavigate(); const { name, id, followers, following, bio, profileImage, answers, tags } = dummyProfile; - return ( <>
@@ -76,8 +44,8 @@ const ProfilePage = () => { - {following} following - {followers} followers + navigate('/followers?tab=follower')}>{following} following + navigate('/followers?tab=following')}>{followers} followers