From a950217abd084af94869698bb8ef7df2c83dc0cd Mon Sep 17 00:00:00 2001 From: min5x5 Date: Fri, 8 Nov 2024 10:11:28 +0900 Subject: [PATCH 1/6] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Refactor:=20=EC=B0=9C?= =?UTF-8?q?=ED=95=9C=EC=95=BD=EC=86=8D=20=ED=8E=98=EC=9D=B4=EC=A7=80=20?= =?UTF-8?q?=EB=82=98=EC=9D=98=EC=95=BD=EC=86=8D=20=EB=B0=96=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(crew)/{my-gathering/favorite => my-favorite}/page.tsx | 2 +- src/app/(crew)/my-gathering/layout.tsx | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) rename src/app/(crew)/{my-gathering/favorite => my-favorite}/page.tsx (87%) diff --git a/src/app/(crew)/my-gathering/favorite/page.tsx b/src/app/(crew)/my-favorite/page.tsx similarity index 87% rename from src/app/(crew)/my-gathering/favorite/page.tsx rename to src/app/(crew)/my-favorite/page.tsx index f73dbb0a..b28044d2 100644 --- a/src/app/(crew)/my-gathering/favorite/page.tsx +++ b/src/app/(crew)/my-favorite/page.tsx @@ -3,7 +3,7 @@ import { gatheringData } from '@/src/mock/gathering-data'; export default function FavoritePage() { return ( -
+
); diff --git a/src/app/(crew)/my-gathering/layout.tsx b/src/app/(crew)/my-gathering/layout.tsx index 3b0f6747..fb0f42ed 100644 --- a/src/app/(crew)/my-gathering/layout.tsx +++ b/src/app/(crew)/my-gathering/layout.tsx @@ -8,7 +8,6 @@ import { Button } from '@mantine/core'; const buttonData = [ { id: 1, label: '참여한 약속', route: '/my-gathering/participation' }, { id: 2, label: '만든 약속', route: '/my-gathering/creation' }, - { id: 3, label: '찜한 약속', route: '/my-gathering/favorite' }, ]; const getSelectedButtonIndex = (currentPath: string) => { @@ -31,7 +30,7 @@ export default function MyGatheringLayout({ return (
-
+
{buttonData.map(({ id, label, route }) => ( - - ))} -
+ handleTabClick(id)} + /> {children}
); diff --git a/src/components/common/tab/index.tsx b/src/components/common/tab/index.tsx index 836820c5..7d8934ff 100644 --- a/src/components/common/tab/index.tsx +++ b/src/components/common/tab/index.tsx @@ -1,6 +1,7 @@ interface Tab { label: string; id: string; + route: string; } export interface TabsProps { @@ -13,7 +14,7 @@ export interface TabsProps { /** * Tabs * - * @param tabs - 탭 목록 데이터 배열로, 각 탭은 label과 id로 구성 + * @param tabs - 탭 목록 데이터 배열로, 각 탭은 label, id, route로 구성 * @param activeTab - 현재 활성화된 탭의 ID * @param onTabClick - 탭 클릭 시 호출되는 함수, 탭 ID를 매개변수로 받음 * @param variant - 탭 스타일 유형, 기본 값은 'default'이며 'review'로 전환 가능 From 6dc31987cece152248ce1f7718e61b29682d6e3b Mon Sep 17 00:00:00 2001 From: min5x5 Date: Mon, 11 Nov 2024 13:39:23 +0900 Subject: [PATCH 4/6] =?UTF-8?q?=F0=9F=92=84=20Style:=20=EA=B0=84=EA=B2=A9?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../my-gathering/_component/gathering-list-with-date.tsx | 6 ++---- src/app/(crew)/my-gathering/creation/page.tsx | 4 ++-- src/app/(crew)/my-gathering/layout.tsx | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/app/(crew)/my-gathering/_component/gathering-list-with-date.tsx b/src/app/(crew)/my-gathering/_component/gathering-list-with-date.tsx index f373ea3d..13b098eb 100644 --- a/src/app/(crew)/my-gathering/_component/gathering-list-with-date.tsx +++ b/src/app/(crew)/my-gathering/_component/gathering-list-with-date.tsx @@ -20,7 +20,7 @@ export default function GatheringListWithDate({ gatheringList }: GatheringListWi }, [gatheringList]); return ( -
+
{gatheringListWithDateInfo.map((gathering) => (
@@ -31,9 +31,7 @@ export default function GatheringListWithDate({ gatheringList }: GatheringListWi
)}
-
+
{gathering.isNewDate &&
}
diff --git a/src/app/(crew)/my-gathering/creation/page.tsx b/src/app/(crew)/my-gathering/creation/page.tsx index 7f4dbc98..97e581fc 100644 --- a/src/app/(crew)/my-gathering/creation/page.tsx +++ b/src/app/(crew)/my-gathering/creation/page.tsx @@ -65,8 +65,8 @@ export default function CreationPage() { ]; return ( -
-
+
+
setSelectedDate(d)} />
diff --git a/src/app/(crew)/my-gathering/layout.tsx b/src/app/(crew)/my-gathering/layout.tsx index a65f61bc..2567dd3f 100644 --- a/src/app/(crew)/my-gathering/layout.tsx +++ b/src/app/(crew)/my-gathering/layout.tsx @@ -29,7 +29,7 @@ export default function MyGatheringLayout({ }; return ( -
+
Date: Mon, 11 Nov 2024 13:41:20 +0900 Subject: [PATCH 5/6] =?UTF-8?q?=F0=9F=92=84=20Style:=20=EA=B0=84=EA=B2=A9?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(crew)/my-gathering/participation/page.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/(crew)/my-gathering/participation/page.tsx b/src/app/(crew)/my-gathering/participation/page.tsx index 638d6dcd..192ef9fd 100644 --- a/src/app/(crew)/my-gathering/participation/page.tsx +++ b/src/app/(crew)/my-gathering/participation/page.tsx @@ -52,8 +52,8 @@ export default function ParticipationPage() { ]; return ( -
-
+
+
setSelectedDate(d)} />
From 5cc61d46c6d8b5c9b8191afd7209f34c768fb027 Mon Sep 17 00:00:00 2001 From: min5x5 Date: Mon, 11 Nov 2024 13:50:01 +0900 Subject: [PATCH 6/6] =?UTF-8?q?=F0=9F=90=9B=20Fix:=20tab=20type=20?= =?UTF-8?q?=EC=97=90=EC=84=9C=20route=20optional=EB=A1=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/tab/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/common/tab/index.tsx b/src/components/common/tab/index.tsx index 7d8934ff..912798e7 100644 --- a/src/components/common/tab/index.tsx +++ b/src/components/common/tab/index.tsx @@ -1,7 +1,7 @@ interface Tab { label: string; id: string; - route: string; + route?: string; } export interface TabsProps {