From b50b79f6c1944b1a1be9d28fda2df02e99542668 Mon Sep 17 00:00:00 2001 From: "SK\\ssssk" Date: Fri, 6 Sep 2024 14:33:15 +0900 Subject: [PATCH] =?UTF-8?q?cleanup:=20=EB=AA=A8=EC=9E=84=20=EA=B4=80?= =?UTF-8?q?=EB=A0=A8=20=ED=8C=8C=EC=9D=BC=20=EB=B0=8F=20=ED=8F=B4=EB=8D=94?= =?UTF-8?q?=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/gathering/[id]/page.tsx | 2 +- src/app/gathering/edit/[id]/page.tsx | 6 +- src/app/gathering/page.tsx | 2 +- src/app/gathering/write/page.tsx | 4 +- src/components/common/GatheringItem.tsx | 4 +- src/components/common/GatheringItemHome.tsx | 4 +- .../gathering/GatheringPagination.tsx | 91 -------------- .../editor/GatheringEditor.tsx | 20 ++-- .../editor/GatheringEditorCategory.tsx | 2 +- .../editor/GatheringEditorChattingLink.tsx | 0 .../editor/GatheringEditorContent.tsx | 0 .../editor/GatheringEditorDeadline.tsx | 2 +- .../editor/GatheringEditorHashTag.tsx | 0 .../GatheringEditorParticipantsFilter.tsx | 2 +- .../editor/GatheringEditorPeriod.tsx | 2 +- .../editor/GatheringEditorPlace.tsx | 2 +- .../editor/GatheringEditorTime.tsx | 2 +- .../editor/GatheringEditorTitle.tsx | 0 .../editor}/modal/GatheringCategoryModal.tsx | 0 .../editor}/modal/GatheringContent.tsx | 0 .../editor}/modal/GatheringDeadlineModal.tsx | 0 .../GatheringParticipantsFilterModal.tsx | 0 .../editor}/modal/GatheringPeriodModal.tsx | 0 .../editor}/modal/GatheringPlaceModal.tsx | 0 .../editor}/modal/GatheringTimeModal.tsx | 0 .../{ => read}/GatheringBookmark.tsx | 0 .../{ => read}/GatheringCardList.tsx | 4 +- .../{ => read}/GatheringKakaoMap.tsx | 0 .../{write => read}/GatheringLike.tsx | 0 .../gathering/{ => read}/GatheringList.tsx | 12 +- .../{write => read}/GatheringPlace.tsx | 0 .../GatheringRecommendationList.tsx | 2 +- .../gathering/{ => read}/GatheringSearch.tsx | 2 +- .../detail}/GatheringApplicantList.tsx | 0 .../detail}/GatheringSupportManagement.tsx | 0 .../GatheringUpdateDeleteButtonComponent.tsx | 0 .../{ => read/detail}/GatheringViewer.tsx | 12 +- .../{ => read/modal}/GatheringFilterModal.tsx | 0 .../gathering/write/GatheringPlacePanel.tsx | 40 ------- .../gathering/write/GatheringSchedule.tsx | 111 ------------------ .../GatheringPaginationContainer.tsx | 28 ----- .../GatheringCreateContainer.tsx} | 6 +- .../GatheringUpdateContainer.tsx} | 8 +- .../GatheringEditorCategoryContainer.tsx | 2 +- .../GatheringEditorChattingLinkContainer.tsx | 2 +- .../GatheringEditorContentContainer.tsx | 2 +- .../GatheringEditorDeadlineContainer.tsx | 2 +- .../GatheringEditorHashTagContainer.tsx | 2 +- ...eringEditorParticipantsFilterContainer.tsx | 2 +- .../editor/GatheringEditorPeriodContainer.tsx | 2 +- .../editor/GatheringEditorPlaceContainer.tsx | 2 +- .../editor/GatheringEditorTimeContainer.tsx | 2 +- .../editor/GatheringEditorTitleContainer.tsx | 2 +- .../{ => read}/GatheringBookmarkContainer.tsx | 0 .../{ => read}/GatheringCardListContainer.tsx | 30 +++-- .../GatheringCategoryListContainer.tsx | 0 .../GatheringExcludeCompleteContainer.tsx | 0 .../{ => read}/GatheringFilterContainer.tsx | 2 +- .../{ => read}/GatheringLikeContainer.tsx | 2 +- .../{ => read}/GatheringListContainer.tsx | 2 +- .../{ => read}/GatheringSearchContainer.tsx | 2 +- .../{ => read}/GatheringSortContainer.tsx | 0 .../GatheringApplicantListContainer.tsx | 2 +- .../detail}/GatheringDeleteModalContainer.tsx | 0 .../GatheringSupportManagementContainer.tsx | 2 +- .../read/detail}/GatheringViewerContainer.tsx | 2 +- 66 files changed, 86 insertions(+), 348 deletions(-) delete mode 100644 src/components/gathering/GatheringPagination.tsx rename src/components/gathering/{ => createUpdate}/editor/GatheringEditor.tsx (85%) rename src/components/gathering/{ => createUpdate}/editor/GatheringEditorCategory.tsx (97%) rename src/components/gathering/{ => createUpdate}/editor/GatheringEditorChattingLink.tsx (100%) rename src/components/gathering/{ => createUpdate}/editor/GatheringEditorContent.tsx (100%) rename src/components/gathering/{ => createUpdate}/editor/GatheringEditorDeadline.tsx (96%) rename src/components/gathering/{ => createUpdate}/editor/GatheringEditorHashTag.tsx (100%) rename src/components/gathering/{ => createUpdate}/editor/GatheringEditorParticipantsFilter.tsx (97%) rename src/components/gathering/{ => createUpdate}/editor/GatheringEditorPeriod.tsx (97%) rename src/components/gathering/{ => createUpdate}/editor/GatheringEditorPlace.tsx (96%) rename src/components/gathering/{ => createUpdate}/editor/GatheringEditorTime.tsx (96%) rename src/components/gathering/{ => createUpdate}/editor/GatheringEditorTitle.tsx (100%) rename src/components/gathering/{ => createUpdate/editor}/modal/GatheringCategoryModal.tsx (100%) rename src/components/gathering/{ => createUpdate/editor}/modal/GatheringContent.tsx (100%) rename src/components/gathering/{ => createUpdate/editor}/modal/GatheringDeadlineModal.tsx (100%) rename src/components/gathering/{ => createUpdate/editor}/modal/GatheringParticipantsFilterModal.tsx (100%) rename src/components/gathering/{ => createUpdate/editor}/modal/GatheringPeriodModal.tsx (100%) rename src/components/gathering/{ => createUpdate/editor}/modal/GatheringPlaceModal.tsx (100%) rename src/components/gathering/{ => createUpdate/editor}/modal/GatheringTimeModal.tsx (100%) rename src/components/gathering/{ => read}/GatheringBookmark.tsx (100%) rename src/components/gathering/{ => read}/GatheringCardList.tsx (86%) rename src/components/gathering/{ => read}/GatheringKakaoMap.tsx (100%) rename src/components/gathering/{write => read}/GatheringLike.tsx (100%) rename src/components/gathering/{ => read}/GatheringList.tsx (78%) rename src/components/gathering/{write => read}/GatheringPlace.tsx (100%) rename src/components/gathering/{ => read}/GatheringRecommendationList.tsx (97%) rename src/components/gathering/{ => read}/GatheringSearch.tsx (97%) rename src/components/gathering/{ => read/detail}/GatheringApplicantList.tsx (100%) rename src/components/gathering/{ => read/detail}/GatheringSupportManagement.tsx (100%) rename src/components/gathering/{ => read/detail}/GatheringUpdateDeleteButtonComponent.tsx (100%) rename src/components/gathering/{ => read/detail}/GatheringViewer.tsx (94%) rename src/components/gathering/{ => read/modal}/GatheringFilterModal.tsx (100%) delete mode 100644 src/components/gathering/write/GatheringPlacePanel.tsx delete mode 100644 src/components/gathering/write/GatheringSchedule.tsx delete mode 100644 src/containers/gathering/GatheringPaginationContainer.tsx rename src/containers/gathering/{write/GatheringWriteContainer.tsx => createUpdate/GatheringCreateContainer.tsx} (94%) rename src/containers/gathering/{edit/GatheringEditorContainer.tsx => createUpdate/GatheringUpdateContainer.tsx} (93%) rename src/containers/gathering/{ => createUpdate}/editor/GatheringEditorCategoryContainer.tsx (90%) rename src/containers/gathering/{ => createUpdate}/editor/GatheringEditorChattingLinkContainer.tsx (86%) rename src/containers/gathering/{ => createUpdate}/editor/GatheringEditorContentContainer.tsx (69%) rename src/containers/gathering/{ => createUpdate}/editor/GatheringEditorDeadlineContainer.tsx (76%) rename src/containers/gathering/{ => createUpdate}/editor/GatheringEditorHashTagContainer.tsx (94%) rename src/containers/gathering/{ => createUpdate}/editor/GatheringEditorParticipantsFilterContainer.tsx (88%) rename src/containers/gathering/{ => createUpdate}/editor/GatheringEditorPeriodContainer.tsx (76%) rename src/containers/gathering/{ => createUpdate}/editor/GatheringEditorPlaceContainer.tsx (76%) rename src/{components/gathering => containers/gathering/createUpdate}/editor/GatheringEditorTimeContainer.tsx (75%) rename src/containers/gathering/{ => createUpdate}/editor/GatheringEditorTitleContainer.tsx (69%) rename src/containers/gathering/{ => read}/GatheringBookmarkContainer.tsx (100%) rename src/containers/gathering/{ => read}/GatheringCardListContainer.tsx (72%) rename src/containers/gathering/{ => read}/GatheringCategoryListContainer.tsx (100%) rename src/containers/gathering/{ => read}/GatheringExcludeCompleteContainer.tsx (100%) rename src/containers/gathering/{ => read}/GatheringFilterContainer.tsx (89%) rename src/containers/gathering/{ => read}/GatheringLikeContainer.tsx (95%) rename src/containers/gathering/{ => read}/GatheringListContainer.tsx (86%) rename src/containers/gathering/{ => read}/GatheringSearchContainer.tsx (97%) rename src/containers/gathering/{ => read}/GatheringSortContainer.tsx (100%) rename src/containers/gathering/{ => read/detail}/GatheringApplicantListContainer.tsx (94%) rename src/{components/gathering/modal => containers/gathering/read/detail}/GatheringDeleteModalContainer.tsx (100%) rename src/containers/gathering/{ => read/detail}/GatheringSupportManagementContainer.tsx (94%) rename src/{components/gathering => containers/gathering/read/detail}/GatheringViewerContainer.tsx (84%) diff --git a/src/app/gathering/[id]/page.tsx b/src/app/gathering/[id]/page.tsx index 70ca5c2f..ead1d7c5 100644 --- a/src/app/gathering/[id]/page.tsx +++ b/src/app/gathering/[id]/page.tsx @@ -1,5 +1,5 @@ -import GatheringRecommendationList from "@/components/gathering/GatheringRecommendationList"; import GatheringViewerContainer from "@/components/gathering/GatheringViewerContainer"; +import GatheringRecommendationList from "@/components/gathering/read/GatheringRecommendationList"; import { GatheringDetailResponseDto } from "@/types/GatheringDto"; import { cookies } from "next/headers"; import { NextResponse } from "next/server"; diff --git a/src/app/gathering/edit/[id]/page.tsx b/src/app/gathering/edit/[id]/page.tsx index a77feda7..5e15e3bf 100644 --- a/src/app/gathering/edit/[id]/page.tsx +++ b/src/app/gathering/edit/[id]/page.tsx @@ -1,4 +1,4 @@ -import GatheringEditorContainer from "@/containers/gathering/edit/GatheringEditorContainer"; +import GatheringUpdateContainer from "@/containers/gathering/createUpdate/GatheringUpdateContainer"; import { GatheringDetailResponseDto } from "@/types/GatheringDto"; import { NextResponse } from "next/server"; @@ -47,10 +47,10 @@ export default async function Page({ params: { id } }: PageProps) { try { const gatheringData = await fetchGatheringData(postId); return ( -
- +
); } catch (error) { diff --git a/src/app/gathering/page.tsx b/src/app/gathering/page.tsx index d188b1f2..3d048871 100644 --- a/src/app/gathering/page.tsx +++ b/src/app/gathering/page.tsx @@ -1,6 +1,6 @@ import Banner from "@/components/common/Banner"; import TopList from "@/components/common/TopList"; -import GatheringListContainer from "@/containers/gathering/GatheringListContainer"; +import GatheringListContainer from "@/containers/gathering/read/GatheringListContainer"; import { Metadata } from "next"; type MyProps = { diff --git a/src/app/gathering/write/page.tsx b/src/app/gathering/write/page.tsx index d1a5a434..25baec95 100644 --- a/src/app/gathering/write/page.tsx +++ b/src/app/gathering/write/page.tsx @@ -1,4 +1,4 @@ -import GatheringWriteContainer from "@/containers/gathering/write/GatheringWriteContainer"; +import GatheringCreateContainer from "@/containers/gathering/createUpdate/GatheringCreateContainer"; import { Metadata } from "next"; export const metadata: Metadata = { @@ -9,7 +9,7 @@ export const metadata: Metadata = { export default function page() { return (
- +
); } diff --git a/src/components/common/GatheringItem.tsx b/src/components/common/GatheringItem.tsx index 846350c3..0c347cee 100644 --- a/src/components/common/GatheringItem.tsx +++ b/src/components/common/GatheringItem.tsx @@ -1,5 +1,5 @@ -import GatheringBookMarkContainer from "@/containers/gathering/GatheringBookmarkContainer"; -import GatheringLikeContainer from "@/containers/gathering/GatheringLikeContainer"; +import GatheringBookMarkContainer from "@/containers/gathering/read/GatheringBookmarkContainer"; +import GatheringLikeContainer from "@/containers/gathering/read/GatheringLikeContainer"; import { Gathering } from "@/types/GatheringDto"; import { convertNumberToShortForm } from "@/utils/convertNumberToShortForm"; import { format } from "date-fns"; diff --git a/src/components/common/GatheringItemHome.tsx b/src/components/common/GatheringItemHome.tsx index 5d568146..3e6e4642 100644 --- a/src/components/common/GatheringItemHome.tsx +++ b/src/components/common/GatheringItemHome.tsx @@ -1,5 +1,5 @@ -import GatheringBookMarkContainer from "@/containers/gathering/GatheringBookmarkContainer"; -import GatheringLikeContainer from "@/containers/gathering/GatheringLikeContainer"; +import GatheringBookMarkContainer from "@/containers/gathering/read/GatheringBookmarkContainer"; +import GatheringLikeContainer from "@/containers/gathering/read/GatheringLikeContainer"; import { GatheringRecommend } from "@/types/GatheringDto"; import { convertNumberToShortForm } from "@/utils/convertNumberToShortForm"; import { format } from "date-fns"; diff --git a/src/components/gathering/GatheringPagination.tsx b/src/components/gathering/GatheringPagination.tsx deleted file mode 100644 index 6e6a40b6..00000000 --- a/src/components/gathering/GatheringPagination.tsx +++ /dev/null @@ -1,91 +0,0 @@ -import { AiOutlineEllipsis } from "react-icons/ai"; -import { IoIosArrowBack, IoIosArrowForward } from "react-icons/io"; -import { MdFirstPage, MdLastPage } from "react-icons/md"; - -interface Props { - currentPage: number; - totalPages: number; - pageHandler: (currentPage: number) => void; -} - -const GatheringPagination = ({ - currentPage, - totalPages, - pageHandler, -}: Props) => { - const pageList = Array.from({ length: totalPages }, (_, index) => index + 1); - const leftPage = Math.max(currentPage - 2, 1); - const rightPage = Math.min(leftPage + 4, totalPages); - - return ( -
- {currentPage > 1 ? ( - - ) : ( -
- )} - {currentPage > 1 ? ( - - ) : ( -
- )} - {leftPage > 1 && ( -
- - -
- )} - {pageList.slice(leftPage - 1, rightPage).map((pageNumber) => ( - - ))} - {rightPage < totalPages && ( -
- - -
- )} - {currentPage < totalPages ? ( - - ) : ( -
- )} - {currentPage < totalPages ? ( - - ) : ( -
- )} -
- ); -}; - -export default GatheringPagination; diff --git a/src/components/gathering/editor/GatheringEditor.tsx b/src/components/gathering/createUpdate/editor/GatheringEditor.tsx similarity index 85% rename from src/components/gathering/editor/GatheringEditor.tsx rename to src/components/gathering/createUpdate/editor/GatheringEditor.tsx index c118384f..a985c6c8 100644 --- a/src/components/gathering/editor/GatheringEditor.tsx +++ b/src/components/gathering/createUpdate/editor/GatheringEditor.tsx @@ -1,18 +1,18 @@ import Breadcrumbs from "@/components/common/Breadcrumb"; -import GatheringEditorCategoryContainer from "@/containers/gathering/editor/GatheringEditorCategoryContainer"; -import GatheringEditorChattingLinkContainer from "@/containers/gathering/editor/GatheringEditorChattingLinkContainer"; -import GatheringEditorContentContainer from "@/containers/gathering/editor/GatheringEditorContentContainer"; -import GatheringEditorDeadlineContainer from "@/containers/gathering/editor/GatheringEditorDeadlineContainer"; -import GatheringEditorHashTagContainer from "@/containers/gathering/editor/GatheringEditorHashTagContainer"; -import GatheringEditorParticipantsFilterContainer from "@/containers/gathering/editor/GatheringEditorParticipantsFilterContainer"; -import GatheringEditorPeriodContainer from "@/containers/gathering/editor/GatheringEditorPeriodContainer"; -import GatheringEditorPlaceContainer from "@/containers/gathering/editor/GatheringEditorPlaceContainer"; -import GatheringEditorTitleContainer from "@/containers/gathering/editor/GatheringEditorTitleContainer"; +import GatheringEditorCategoryContainer from "@/containers/gathering/createUpdate/editor/GatheringEditorCategoryContainer"; +import GatheringEditorChattingLinkContainer from "@/containers/gathering/createUpdate/editor/GatheringEditorChattingLinkContainer"; +import GatheringEditorContentContainer from "@/containers/gathering/createUpdate/editor/GatheringEditorContentContainer"; +import GatheringEditorDeadlineContainer from "@/containers/gathering/createUpdate/editor/GatheringEditorDeadlineContainer"; +import GatheringEditorHashTagContainer from "@/containers/gathering/createUpdate/editor/GatheringEditorHashTagContainer"; +import GatheringEditorParticipantsFilterContainer from "@/containers/gathering/createUpdate/editor/GatheringEditorParticipantsFilterContainer"; +import GatheringEditorPeriodContainer from "@/containers/gathering/createUpdate/editor/GatheringEditorPeriodContainer"; +import GatheringEditorPlaceContainer from "@/containers/gathering/createUpdate/editor/GatheringEditorPlaceContainer"; +import GatheringEditorTitleContainer from "@/containers/gathering/createUpdate/editor/GatheringEditorTitleContainer"; import Image from "next/image"; import "react-date-range/dist/styles.css"; import "react-date-range/dist/theme/default.css"; import { useFormContext } from "react-hook-form"; -import GatheringEditorTimeContainer from "./GatheringEditorTimeContainer"; +import GatheringEditorTimeContainer from "../../../../containers/gathering/createUpdate/editor/GatheringEditorTimeContainer"; interface IGatheringEditorEditProps { isEdit: true; diff --git a/src/components/gathering/editor/GatheringEditorCategory.tsx b/src/components/gathering/createUpdate/editor/GatheringEditorCategory.tsx similarity index 97% rename from src/components/gathering/editor/GatheringEditorCategory.tsx rename to src/components/gathering/createUpdate/editor/GatheringEditorCategory.tsx index c39951f4..73193579 100644 --- a/src/components/gathering/editor/GatheringEditorCategory.tsx +++ b/src/components/gathering/createUpdate/editor/GatheringEditorCategory.tsx @@ -1,7 +1,7 @@ import { Modal } from "@/components/common/modal/Modal"; import { ModalState } from "@/types/ModalState"; import { useFormContext } from "react-hook-form"; -import GatheringCategoryModal from "../modal/GatheringCategoryModal"; +import GatheringCategoryModal from "./modal/GatheringCategoryModal"; interface ICategory { id: number; diff --git a/src/components/gathering/editor/GatheringEditorChattingLink.tsx b/src/components/gathering/createUpdate/editor/GatheringEditorChattingLink.tsx similarity index 100% rename from src/components/gathering/editor/GatheringEditorChattingLink.tsx rename to src/components/gathering/createUpdate/editor/GatheringEditorChattingLink.tsx diff --git a/src/components/gathering/editor/GatheringEditorContent.tsx b/src/components/gathering/createUpdate/editor/GatheringEditorContent.tsx similarity index 100% rename from src/components/gathering/editor/GatheringEditorContent.tsx rename to src/components/gathering/createUpdate/editor/GatheringEditorContent.tsx diff --git a/src/components/gathering/editor/GatheringEditorDeadline.tsx b/src/components/gathering/createUpdate/editor/GatheringEditorDeadline.tsx similarity index 96% rename from src/components/gathering/editor/GatheringEditorDeadline.tsx rename to src/components/gathering/createUpdate/editor/GatheringEditorDeadline.tsx index 8fafffbc..b66ecb7c 100644 --- a/src/components/gathering/editor/GatheringEditorDeadline.tsx +++ b/src/components/gathering/createUpdate/editor/GatheringEditorDeadline.tsx @@ -3,7 +3,7 @@ import { ModalState } from "@/types/ModalState"; import { format } from "date-fns"; import Image from "next/image"; import { useFormContext } from "react-hook-form"; -import GatheringDeadlineModal from "../modal/GatheringDeadlineModal"; +import GatheringDeadlineModal from "./modal/GatheringDeadlineModal"; interface IGatheringEditorDeadline { modalState: ModalState; diff --git a/src/components/gathering/editor/GatheringEditorHashTag.tsx b/src/components/gathering/createUpdate/editor/GatheringEditorHashTag.tsx similarity index 100% rename from src/components/gathering/editor/GatheringEditorHashTag.tsx rename to src/components/gathering/createUpdate/editor/GatheringEditorHashTag.tsx diff --git a/src/components/gathering/editor/GatheringEditorParticipantsFilter.tsx b/src/components/gathering/createUpdate/editor/GatheringEditorParticipantsFilter.tsx similarity index 97% rename from src/components/gathering/editor/GatheringEditorParticipantsFilter.tsx rename to src/components/gathering/createUpdate/editor/GatheringEditorParticipantsFilter.tsx index c5cb7e03..36cc6355 100644 --- a/src/components/gathering/editor/GatheringEditorParticipantsFilter.tsx +++ b/src/components/gathering/createUpdate/editor/GatheringEditorParticipantsFilter.tsx @@ -2,7 +2,7 @@ import { Modal } from "@/components/common/modal/Modal"; import { SETTING_MODAL_SEX } from "@/constants/gathering/GatheringConstant"; import { ModalState } from "@/types/ModalState"; import { useFormContext } from "react-hook-form"; -import GatheringParticipantsFilterModal from "../modal/GatheringParticipantsFilterModal"; +import GatheringParticipantsFilterModal from "./modal/GatheringParticipantsFilterModal"; interface IGatheringEditorParticipantsFilter { modalState: ModalState; diff --git a/src/components/gathering/editor/GatheringEditorPeriod.tsx b/src/components/gathering/createUpdate/editor/GatheringEditorPeriod.tsx similarity index 97% rename from src/components/gathering/editor/GatheringEditorPeriod.tsx rename to src/components/gathering/createUpdate/editor/GatheringEditorPeriod.tsx index 1e8c0cef..96f0c6fc 100644 --- a/src/components/gathering/editor/GatheringEditorPeriod.tsx +++ b/src/components/gathering/createUpdate/editor/GatheringEditorPeriod.tsx @@ -3,7 +3,7 @@ import { ModalState } from "@/types/ModalState"; import { format } from "date-fns"; import Image from "next/image"; import { useFormContext } from "react-hook-form"; -import GatheringPeriodModal from "../modal/GatheringPeriodModal"; +import GatheringPeriodModal from "./modal/GatheringPeriodModal"; interface IGatheringEditorPeriod { modalState: ModalState diff --git a/src/components/gathering/editor/GatheringEditorPlace.tsx b/src/components/gathering/createUpdate/editor/GatheringEditorPlace.tsx similarity index 96% rename from src/components/gathering/editor/GatheringEditorPlace.tsx rename to src/components/gathering/createUpdate/editor/GatheringEditorPlace.tsx index 21f65d99..9e309008 100644 --- a/src/components/gathering/editor/GatheringEditorPlace.tsx +++ b/src/components/gathering/createUpdate/editor/GatheringEditorPlace.tsx @@ -1,7 +1,7 @@ import { Modal } from "@/components/common/modal/Modal"; import { ModalState } from "@/types/ModalState"; import { useFormContext } from "react-hook-form"; -import GatheringPlaceModal from "../modal/GatheringPlaceModal"; +import GatheringPlaceModal from "./modal/GatheringPlaceModal"; interface IGatheringEditorPlace { modalState: ModalState; diff --git a/src/components/gathering/editor/GatheringEditorTime.tsx b/src/components/gathering/createUpdate/editor/GatheringEditorTime.tsx similarity index 96% rename from src/components/gathering/editor/GatheringEditorTime.tsx rename to src/components/gathering/createUpdate/editor/GatheringEditorTime.tsx index 3abfa8f9..89bb264c 100644 --- a/src/components/gathering/editor/GatheringEditorTime.tsx +++ b/src/components/gathering/createUpdate/editor/GatheringEditorTime.tsx @@ -2,7 +2,7 @@ import { Modal } from '@/components/common/modal/Modal'; import { ModalState } from '@/types/ModalState'; import { format } from 'date-fns'; import { useFormContext } from 'react-hook-form'; -import GatheringTimeModal from '../modal/GatheringTimeModal'; +import GatheringTimeModal from './modal/GatheringTimeModal'; interface IGatheringEditorTime { modalState: ModalState diff --git a/src/components/gathering/editor/GatheringEditorTitle.tsx b/src/components/gathering/createUpdate/editor/GatheringEditorTitle.tsx similarity index 100% rename from src/components/gathering/editor/GatheringEditorTitle.tsx rename to src/components/gathering/createUpdate/editor/GatheringEditorTitle.tsx diff --git a/src/components/gathering/modal/GatheringCategoryModal.tsx b/src/components/gathering/createUpdate/editor/modal/GatheringCategoryModal.tsx similarity index 100% rename from src/components/gathering/modal/GatheringCategoryModal.tsx rename to src/components/gathering/createUpdate/editor/modal/GatheringCategoryModal.tsx diff --git a/src/components/gathering/modal/GatheringContent.tsx b/src/components/gathering/createUpdate/editor/modal/GatheringContent.tsx similarity index 100% rename from src/components/gathering/modal/GatheringContent.tsx rename to src/components/gathering/createUpdate/editor/modal/GatheringContent.tsx diff --git a/src/components/gathering/modal/GatheringDeadlineModal.tsx b/src/components/gathering/createUpdate/editor/modal/GatheringDeadlineModal.tsx similarity index 100% rename from src/components/gathering/modal/GatheringDeadlineModal.tsx rename to src/components/gathering/createUpdate/editor/modal/GatheringDeadlineModal.tsx diff --git a/src/components/gathering/modal/GatheringParticipantsFilterModal.tsx b/src/components/gathering/createUpdate/editor/modal/GatheringParticipantsFilterModal.tsx similarity index 100% rename from src/components/gathering/modal/GatheringParticipantsFilterModal.tsx rename to src/components/gathering/createUpdate/editor/modal/GatheringParticipantsFilterModal.tsx diff --git a/src/components/gathering/modal/GatheringPeriodModal.tsx b/src/components/gathering/createUpdate/editor/modal/GatheringPeriodModal.tsx similarity index 100% rename from src/components/gathering/modal/GatheringPeriodModal.tsx rename to src/components/gathering/createUpdate/editor/modal/GatheringPeriodModal.tsx diff --git a/src/components/gathering/modal/GatheringPlaceModal.tsx b/src/components/gathering/createUpdate/editor/modal/GatheringPlaceModal.tsx similarity index 100% rename from src/components/gathering/modal/GatheringPlaceModal.tsx rename to src/components/gathering/createUpdate/editor/modal/GatheringPlaceModal.tsx diff --git a/src/components/gathering/modal/GatheringTimeModal.tsx b/src/components/gathering/createUpdate/editor/modal/GatheringTimeModal.tsx similarity index 100% rename from src/components/gathering/modal/GatheringTimeModal.tsx rename to src/components/gathering/createUpdate/editor/modal/GatheringTimeModal.tsx diff --git a/src/components/gathering/GatheringBookmark.tsx b/src/components/gathering/read/GatheringBookmark.tsx similarity index 100% rename from src/components/gathering/GatheringBookmark.tsx rename to src/components/gathering/read/GatheringBookmark.tsx diff --git a/src/components/gathering/GatheringCardList.tsx b/src/components/gathering/read/GatheringCardList.tsx similarity index 86% rename from src/components/gathering/GatheringCardList.tsx rename to src/components/gathering/read/GatheringCardList.tsx index e682755d..402958b9 100644 --- a/src/components/gathering/GatheringCardList.tsx +++ b/src/components/gathering/read/GatheringCardList.tsx @@ -1,7 +1,7 @@ import LottieFile from "@/../public/lottie/list-not-found.json"; import { Gathering } from "@/types/GatheringDto"; -import GatheringItem from "../common/GatheringItem"; -import LottieComponent from "../common/lottie/LottieComponent"; +import GatheringItem from "../../common/GatheringItem"; +import LottieComponent from "../../common/lottie/LottieComponent"; interface IGatheringCardList { data: Gathering[] } diff --git a/src/components/gathering/GatheringKakaoMap.tsx b/src/components/gathering/read/GatheringKakaoMap.tsx similarity index 100% rename from src/components/gathering/GatheringKakaoMap.tsx rename to src/components/gathering/read/GatheringKakaoMap.tsx diff --git a/src/components/gathering/write/GatheringLike.tsx b/src/components/gathering/read/GatheringLike.tsx similarity index 100% rename from src/components/gathering/write/GatheringLike.tsx rename to src/components/gathering/read/GatheringLike.tsx diff --git a/src/components/gathering/GatheringList.tsx b/src/components/gathering/read/GatheringList.tsx similarity index 78% rename from src/components/gathering/GatheringList.tsx rename to src/components/gathering/read/GatheringList.tsx index fb9ce472..48285378 100644 --- a/src/components/gathering/GatheringList.tsx +++ b/src/components/gathering/read/GatheringList.tsx @@ -1,11 +1,11 @@ "use client" -import GatheringCardListContainer from "@/containers/gathering/GatheringCardListContainer"; -import GatheringCategoryListContainer from "@/containers/gathering/GatheringCategoryListContainer"; -import GatheringExcludeCompleteContainer from "@/containers/gathering/GatheringExcludeCompleteContainer"; -import GatheringFilterContainer from "@/containers/gathering/GatheringFilterContainer"; -import GatheringSearchContainer from "@/containers/gathering/GatheringSearchContainer"; -import GatheringSortContainer from "@/containers/gathering/GatheringSortContainer"; +import GatheringCardListContainer from "@/containers/gathering/read/GatheringCardListContainer"; +import GatheringCategoryListContainer from "@/containers/gathering/read/GatheringCategoryListContainer"; +import GatheringExcludeCompleteContainer from "@/containers/gathering/read/GatheringExcludeCompleteContainer"; +import GatheringFilterContainer from "@/containers/gathering/read/GatheringFilterContainer"; +import GatheringSearchContainer from "@/containers/gathering/read/GatheringSearchContainer"; +import GatheringSortContainer from "@/containers/gathering/read/GatheringSortContainer"; import { GatheringCategoryListType } from "@/types/GatheringCategoryDto"; import "react-date-range/dist/styles.css"; import "react-date-range/dist/theme/default.css"; diff --git a/src/components/gathering/write/GatheringPlace.tsx b/src/components/gathering/read/GatheringPlace.tsx similarity index 100% rename from src/components/gathering/write/GatheringPlace.tsx rename to src/components/gathering/read/GatheringPlace.tsx diff --git a/src/components/gathering/GatheringRecommendationList.tsx b/src/components/gathering/read/GatheringRecommendationList.tsx similarity index 97% rename from src/components/gathering/GatheringRecommendationList.tsx rename to src/components/gathering/read/GatheringRecommendationList.tsx index 83269137..683465ea 100644 --- a/src/components/gathering/GatheringRecommendationList.tsx +++ b/src/components/gathering/read/GatheringRecommendationList.tsx @@ -3,7 +3,7 @@ import { Gathering, GatheringRecommend } from "@/types/GatheringDto"; import { fetchWithAuth } from "@/utils/fetchWithAuth"; import { useState } from "react"; -import GatheringItem from "../common/GatheringItem"; +import GatheringItem from "../../common/GatheringItem"; const GatheringRecommendationList = ({data}: {data: GatheringRecommend[]}) => { const [elements, setElements] = useState(data); diff --git a/src/components/gathering/GatheringSearch.tsx b/src/components/gathering/read/GatheringSearch.tsx similarity index 97% rename from src/components/gathering/GatheringSearch.tsx rename to src/components/gathering/read/GatheringSearch.tsx index 2a1a49e8..001a2f75 100644 --- a/src/components/gathering/GatheringSearch.tsx +++ b/src/components/gathering/read/GatheringSearch.tsx @@ -1,5 +1,5 @@ import Image from "next/image"; -import Dropdown from "../common/dropdown/Dropdown"; +import Dropdown from "../../common/dropdown/Dropdown"; interface Props { dropDownHandler: (value: string) => void; diff --git a/src/components/gathering/GatheringApplicantList.tsx b/src/components/gathering/read/detail/GatheringApplicantList.tsx similarity index 100% rename from src/components/gathering/GatheringApplicantList.tsx rename to src/components/gathering/read/detail/GatheringApplicantList.tsx diff --git a/src/components/gathering/GatheringSupportManagement.tsx b/src/components/gathering/read/detail/GatheringSupportManagement.tsx similarity index 100% rename from src/components/gathering/GatheringSupportManagement.tsx rename to src/components/gathering/read/detail/GatheringSupportManagement.tsx diff --git a/src/components/gathering/GatheringUpdateDeleteButtonComponent.tsx b/src/components/gathering/read/detail/GatheringUpdateDeleteButtonComponent.tsx similarity index 100% rename from src/components/gathering/GatheringUpdateDeleteButtonComponent.tsx rename to src/components/gathering/read/detail/GatheringUpdateDeleteButtonComponent.tsx diff --git a/src/components/gathering/GatheringViewer.tsx b/src/components/gathering/read/detail/GatheringViewer.tsx similarity index 94% rename from src/components/gathering/GatheringViewer.tsx rename to src/components/gathering/read/detail/GatheringViewer.tsx index e37d95b1..ce98cc27 100644 --- a/src/components/gathering/GatheringViewer.tsx +++ b/src/components/gathering/read/detail/GatheringViewer.tsx @@ -1,17 +1,17 @@ import { SETTING_MODAL_SEX } from "@/constants/gathering/GatheringConstant"; -import GatheringApplicantListContainer from "@/containers/gathering/GatheringApplicantListContainer"; -import GatheringSupportManagementContainer from "@/containers/gathering/GatheringSupportManagementContainer"; +import GatheringApplicantListContainer from "@/containers/gathering/read/detail/GatheringApplicantListContainer"; +import GatheringSupportManagementContainer from "@/containers/gathering/read/detail/GatheringSupportManagementContainer"; import { GatheringDetailResponseDto } from "@/types/GatheringDto"; import { ModalState } from "@/types/ModalState"; import { convertNumberToShortForm } from "@/utils/convertNumberToShortForm"; import { format } from "date-fns"; import { ko } from 'date-fns/locale'; import Image from "next/image"; -import GatheringLike from "../../containers/gathering/GatheringLikeContainer"; -import Breadcrumbs from "../common/Breadcrumb"; -import GatheringKakaoMap from "./GatheringKakaoMap"; +import GatheringDeleteModalContainer from "../../../../containers/gathering/read/detail/GatheringDeleteModalContainer"; +import GatheringLike from "../../../../containers/gathering/read/GatheringLikeContainer"; +import Breadcrumbs from "../../../common/Breadcrumb"; +import GatheringKakaoMap from "../GatheringKakaoMap"; import GatheringUpdateDeleteButtonComponent from "./GatheringUpdateDeleteButtonComponent"; -import GatheringDeleteModalContainer from "./modal/GatheringDeleteModalContainer"; interface IGatheringViewer { data: GatheringDetailResponseDto; diff --git a/src/components/gathering/GatheringFilterModal.tsx b/src/components/gathering/read/modal/GatheringFilterModal.tsx similarity index 100% rename from src/components/gathering/GatheringFilterModal.tsx rename to src/components/gathering/read/modal/GatheringFilterModal.tsx diff --git a/src/components/gathering/write/GatheringPlacePanel.tsx b/src/components/gathering/write/GatheringPlacePanel.tsx deleted file mode 100644 index 5989a51e..00000000 --- a/src/components/gathering/write/GatheringPlacePanel.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import { Modal } from "@/components/common/modal/Modal"; -import { useFormContext } from "react-hook-form"; -import GatheringPlaceModal from "../modal/GatheringPlaceModal"; - -interface GatheringPlaceSettingPanelProps { - isModal: boolean; - closeModal: () => void; - openModal: () => void; -} - -const GatheringPlaceSettingPanel = ({ - isModal, closeModal, openModal -}: GatheringPlaceSettingPanelProps) => { - const formContext = useFormContext(); - - return ( -
-
- - 장소 - * - -
- -
{formContext.getValues("placeName") && "OK"}
- {typeof window !== "undefined" && ( - - - - )} -
- ); -}; - -export default GatheringPlaceSettingPanel; diff --git a/src/components/gathering/write/GatheringSchedule.tsx b/src/components/gathering/write/GatheringSchedule.tsx deleted file mode 100644 index 02ed353d..00000000 --- a/src/components/gathering/write/GatheringSchedule.tsx +++ /dev/null @@ -1,111 +0,0 @@ -import { Modal } from "@/components/common/modal/Modal"; -import { SETTING_MODAL_DAY_OF_THE_WEEK } from "@/constants/gathering/GatheringConstant"; -import { useFormContext } from "react-hook-form"; -import GatheringScheduleModal from "../modal/GatheringPeriodModal"; - -interface IGatheringScheduleProps { - isModal: boolean; - closeModal: () => void; - openModal: () => void; -} - -const GatheringSchedule = (props: IGatheringScheduleProps) => { - const formContext = useFormContext(); - - return ( -
-
-
- - 일정 - - * - - -
- -
{formContext.formState.errors.scheduleStartDate == undefined && formContext.formState.errors.scheduleEndDate == undefined && formContext.getValues("scheduleStartDate") && "OK"}
- props.closeModal()}> - props.closeModal()} /> - -
-
-
-
- 시작 : - {formContext.getValues("scheduleStartDate") && ( -
- - {formContext.getValues("scheduleStartDate").substring(0, 10)} - - - {"(" + - SETTING_MODAL_DAY_OF_THE_WEEK[ - new Date( - formContext - .getValues("scheduleStartDate") - .substring(0, 10), - ).getDay() - ] + - ")"} - - - {formContext - .getValues("scheduleStartDate") - .substring( - 11, - formContext.getValues("scheduleStartDate").length, - )} - - {formContext.formState.errors.scheduleStartDate?.message as string} -
- )} -
-
- 종료 : - {formContext.getValues("scheduleEndDate") && ( -
- - {formContext.getValues("scheduleEndDate").substring(0, 10)} - - - {"(" + - SETTING_MODAL_DAY_OF_THE_WEEK[ - new Date( - formContext - .getValues("scheduleEndDate") - .substring(0, 10), - ).getDay() - ] + - ")"} - - - {formContext - .getValues("scheduleEndDate") - .substring( - 11, - formContext.getValues("scheduleEndDate").length, - )} - - {formContext.formState.errors.scheduleEndDate?.message as string} -
- )} -
-
-
-
- ); -}; - -export default GatheringSchedule; diff --git a/src/containers/gathering/GatheringPaginationContainer.tsx b/src/containers/gathering/GatheringPaginationContainer.tsx deleted file mode 100644 index cf813667..00000000 --- a/src/containers/gathering/GatheringPaginationContainer.tsx +++ /dev/null @@ -1,28 +0,0 @@ -"use client"; - -import GatheringPagination from "@/components/gathering/GatheringPagination"; - -interface Props { - currentPage: number; - totalPages: number; -} - -const GatheringPaginationContainer = ({ currentPage, totalPages }: Props) => { - const pageHandler = (page: number) => { - const url = new URL(window.location.href); - const params = new URLSearchParams(url.search); - params.set("page", page+""); - url.search = params.toString(); - window.history.pushState({}, "", url.toString()); - } - - return ( - - ); -}; - -export default GatheringPaginationContainer; diff --git a/src/containers/gathering/write/GatheringWriteContainer.tsx b/src/containers/gathering/createUpdate/GatheringCreateContainer.tsx similarity index 94% rename from src/containers/gathering/write/GatheringWriteContainer.tsx rename to src/containers/gathering/createUpdate/GatheringCreateContainer.tsx index 97f5c567..2f465377 100644 --- a/src/containers/gathering/write/GatheringWriteContainer.tsx +++ b/src/containers/gathering/createUpdate/GatheringCreateContainer.tsx @@ -1,6 +1,6 @@ "use client"; -import GatheringEditor from "@/components/gathering/editor/GatheringEditor"; +import GatheringEditor from "@/components/gathering/createUpdate/editor/GatheringEditor"; import { gatheringCreateFormSchema } from "@/lib/examples/zod/schema/GatheringCreateFormSchema"; import { convertRegionToTwoLetters } from "@/utils/constant/regionHashMap"; import { fetchWithAuth } from "@/utils/fetchWithAuth"; @@ -9,7 +9,7 @@ import { useRouter } from "next/navigation"; import { useState } from "react"; import { FormProvider, useForm } from "react-hook-form"; -const GatheringWriteContainer = () => { +const GatheringCreateContainer = () => { const router = useRouter(); const [loading, setLoading] = useState(false); const methods = useForm({ @@ -96,4 +96,4 @@ const GatheringWriteContainer = () => { ); }; -export default GatheringWriteContainer; +export default GatheringCreateContainer; diff --git a/src/containers/gathering/edit/GatheringEditorContainer.tsx b/src/containers/gathering/createUpdate/GatheringUpdateContainer.tsx similarity index 93% rename from src/containers/gathering/edit/GatheringEditorContainer.tsx rename to src/containers/gathering/createUpdate/GatheringUpdateContainer.tsx index 50746a3c..6e9a3a02 100644 --- a/src/containers/gathering/edit/GatheringEditorContainer.tsx +++ b/src/containers/gathering/createUpdate/GatheringUpdateContainer.tsx @@ -1,6 +1,6 @@ "use client"; -import GatheringEditor from "@/components/gathering/editor/GatheringEditor"; +import GatheringEditor from "@/components/gathering/createUpdate/editor/GatheringEditor"; import { gatheringCreateFormSchema } from "@/lib/examples/zod/schema/GatheringCreateFormSchema"; import { GatheringDetailResponseDto } from "@/types/GatheringDto"; import { convertRegionToTwoLetters } from "@/utils/constant/regionHashMap"; @@ -11,11 +11,11 @@ import { useParams, useRouter } from "next/navigation"; import { useEffect, useState } from "react"; import { FormProvider, useForm } from "react-hook-form"; -interface IGatheringEditorContainer { +interface IGatheringUpdateContainer { gatheringData: GatheringDetailResponseDto } -const GatheringEditorContainer = ({gatheringData}: IGatheringEditorContainer) => { +const GatheringUpdateContainer = ({gatheringData}: IGatheringUpdateContainer) => { const router = useRouter(); const [loading, setLoading] = useState(false); const methods = useForm({ @@ -121,4 +121,4 @@ const GatheringEditorContainer = ({gatheringData}: IGatheringEditorContainer) => ); }; -export default GatheringEditorContainer; +export default GatheringUpdateContainer; diff --git a/src/containers/gathering/editor/GatheringEditorCategoryContainer.tsx b/src/containers/gathering/createUpdate/editor/GatheringEditorCategoryContainer.tsx similarity index 90% rename from src/containers/gathering/editor/GatheringEditorCategoryContainer.tsx rename to src/containers/gathering/createUpdate/editor/GatheringEditorCategoryContainer.tsx index 1a38ca50..ce6f296c 100644 --- a/src/containers/gathering/editor/GatheringEditorCategoryContainer.tsx +++ b/src/containers/gathering/createUpdate/editor/GatheringEditorCategoryContainer.tsx @@ -1,4 +1,4 @@ -import GatheringEditorCategory from "@/components/gathering/editor/GatheringEditorCategory"; +import GatheringEditorCategory from "@/components/gathering/createUpdate/editor/GatheringEditorCategory"; import useModalState from "@/hooks/useModalState"; import { useEffect, useState } from "react"; diff --git a/src/containers/gathering/editor/GatheringEditorChattingLinkContainer.tsx b/src/containers/gathering/createUpdate/editor/GatheringEditorChattingLinkContainer.tsx similarity index 86% rename from src/containers/gathering/editor/GatheringEditorChattingLinkContainer.tsx rename to src/containers/gathering/createUpdate/editor/GatheringEditorChattingLinkContainer.tsx index a45d1407..ae11feed 100644 --- a/src/containers/gathering/editor/GatheringEditorChattingLinkContainer.tsx +++ b/src/containers/gathering/createUpdate/editor/GatheringEditorChattingLinkContainer.tsx @@ -1,4 +1,4 @@ -import GatheringEditorChattingLink from "@/components/gathering/editor/GatheringEditorChattingLink"; +import GatheringEditorChattingLink from "@/components/gathering/createUpdate/editor/GatheringEditorChattingLink"; interface IGatheringEditorChattingLinkContainer { diff --git a/src/containers/gathering/editor/GatheringEditorContentContainer.tsx b/src/containers/gathering/createUpdate/editor/GatheringEditorContentContainer.tsx similarity index 69% rename from src/containers/gathering/editor/GatheringEditorContentContainer.tsx rename to src/containers/gathering/createUpdate/editor/GatheringEditorContentContainer.tsx index 551306d4..d30da77e 100644 --- a/src/containers/gathering/editor/GatheringEditorContentContainer.tsx +++ b/src/containers/gathering/createUpdate/editor/GatheringEditorContentContainer.tsx @@ -1,4 +1,4 @@ -import GatheringEditorContent from "@/components/gathering/editor/GatheringEditorContent"; +import GatheringEditorContent from "@/components/gathering/createUpdate/editor/GatheringEditorContent"; interface IGatheringEditorContentContainer { diff --git a/src/containers/gathering/editor/GatheringEditorDeadlineContainer.tsx b/src/containers/gathering/createUpdate/editor/GatheringEditorDeadlineContainer.tsx similarity index 76% rename from src/containers/gathering/editor/GatheringEditorDeadlineContainer.tsx rename to src/containers/gathering/createUpdate/editor/GatheringEditorDeadlineContainer.tsx index 6161d7ad..da80050c 100644 --- a/src/containers/gathering/editor/GatheringEditorDeadlineContainer.tsx +++ b/src/containers/gathering/createUpdate/editor/GatheringEditorDeadlineContainer.tsx @@ -1,4 +1,4 @@ -import GatheringEditorDeadline from "@/components/gathering/editor/GatheringEditorDeadline"; +import GatheringEditorDeadline from "@/components/gathering/createUpdate/editor/GatheringEditorDeadline"; import useModalState from "@/hooks/useModalState"; interface IGatheringEditorDeadlineContainer { diff --git a/src/containers/gathering/editor/GatheringEditorHashTagContainer.tsx b/src/containers/gathering/createUpdate/editor/GatheringEditorHashTagContainer.tsx similarity index 94% rename from src/containers/gathering/editor/GatheringEditorHashTagContainer.tsx rename to src/containers/gathering/createUpdate/editor/GatheringEditorHashTagContainer.tsx index 6c70474c..71680de5 100644 --- a/src/containers/gathering/editor/GatheringEditorHashTagContainer.tsx +++ b/src/containers/gathering/createUpdate/editor/GatheringEditorHashTagContainer.tsx @@ -1,4 +1,4 @@ -import GatheringEditorHashTag from "@/components/gathering/editor/GatheringEditorHashTag"; +import GatheringEditorHashTag from "@/components/gathering/createUpdate/editor/GatheringEditorHashTag"; import { useRef, useState } from "react"; import { useFormContext } from "react-hook-form"; diff --git a/src/containers/gathering/editor/GatheringEditorParticipantsFilterContainer.tsx b/src/containers/gathering/createUpdate/editor/GatheringEditorParticipantsFilterContainer.tsx similarity index 88% rename from src/containers/gathering/editor/GatheringEditorParticipantsFilterContainer.tsx rename to src/containers/gathering/createUpdate/editor/GatheringEditorParticipantsFilterContainer.tsx index 753bb175..0686b0b8 100644 --- a/src/containers/gathering/editor/GatheringEditorParticipantsFilterContainer.tsx +++ b/src/containers/gathering/createUpdate/editor/GatheringEditorParticipantsFilterContainer.tsx @@ -1,4 +1,4 @@ -import GatheringEditorParticipantsFilter from "@/components/gathering/editor/GatheringEditorParticipantsFilter"; +import GatheringEditorParticipantsFilter from "@/components/gathering/createUpdate/editor/GatheringEditorParticipantsFilter"; import useModalState from "@/hooks/useModalState"; interface IGatheringEditorParticipantsFilterContainer { diff --git a/src/containers/gathering/editor/GatheringEditorPeriodContainer.tsx b/src/containers/gathering/createUpdate/editor/GatheringEditorPeriodContainer.tsx similarity index 76% rename from src/containers/gathering/editor/GatheringEditorPeriodContainer.tsx rename to src/containers/gathering/createUpdate/editor/GatheringEditorPeriodContainer.tsx index 51a1499e..f82f5410 100644 --- a/src/containers/gathering/editor/GatheringEditorPeriodContainer.tsx +++ b/src/containers/gathering/createUpdate/editor/GatheringEditorPeriodContainer.tsx @@ -1,4 +1,4 @@ -import GatheringEditorPeriod from "@/components/gathering/editor/GatheringEditorPeriod"; +import GatheringEditorPeriod from "@/components/gathering/createUpdate/editor/GatheringEditorPeriod"; import useModalState from "@/hooks/useModalState"; interface IGatheringEditorPeriodContainer {} diff --git a/src/containers/gathering/editor/GatheringEditorPlaceContainer.tsx b/src/containers/gathering/createUpdate/editor/GatheringEditorPlaceContainer.tsx similarity index 76% rename from src/containers/gathering/editor/GatheringEditorPlaceContainer.tsx rename to src/containers/gathering/createUpdate/editor/GatheringEditorPlaceContainer.tsx index c50e1929..3d225de1 100644 --- a/src/containers/gathering/editor/GatheringEditorPlaceContainer.tsx +++ b/src/containers/gathering/createUpdate/editor/GatheringEditorPlaceContainer.tsx @@ -1,4 +1,4 @@ -import GatheringEditorPlace from "@/components/gathering/editor/GatheringEditorPlace"; +import GatheringEditorPlace from "@/components/gathering/createUpdate/editor/GatheringEditorPlace"; import useModalState from "@/hooks/useModalState"; interface IGatheringEditorPlaceContainer { diff --git a/src/components/gathering/editor/GatheringEditorTimeContainer.tsx b/src/containers/gathering/createUpdate/editor/GatheringEditorTimeContainer.tsx similarity index 75% rename from src/components/gathering/editor/GatheringEditorTimeContainer.tsx rename to src/containers/gathering/createUpdate/editor/GatheringEditorTimeContainer.tsx index 51a57fa3..7e569a5d 100644 --- a/src/components/gathering/editor/GatheringEditorTimeContainer.tsx +++ b/src/containers/gathering/createUpdate/editor/GatheringEditorTimeContainer.tsx @@ -1,5 +1,5 @@ import useModalState from "@/hooks/useModalState"; -import GatheringEditorTime from "./GatheringEditorTime"; +import GatheringEditorTime from "../../../../components/gathering/createUpdate/editor/GatheringEditorTime"; interface IGatheringEditorTimeContainer { diff --git a/src/containers/gathering/editor/GatheringEditorTitleContainer.tsx b/src/containers/gathering/createUpdate/editor/GatheringEditorTitleContainer.tsx similarity index 69% rename from src/containers/gathering/editor/GatheringEditorTitleContainer.tsx rename to src/containers/gathering/createUpdate/editor/GatheringEditorTitleContainer.tsx index 60bbd4da..78274cb5 100644 --- a/src/containers/gathering/editor/GatheringEditorTitleContainer.tsx +++ b/src/containers/gathering/createUpdate/editor/GatheringEditorTitleContainer.tsx @@ -1,4 +1,4 @@ -import GatheringEditorTitle from "@/components/gathering/editor/GatheringEditorTitle"; +import GatheringEditorTitle from "@/components/gathering/createUpdate/editor/GatheringEditorTitle"; interface IGatheringEditorTitleContainer { diff --git a/src/containers/gathering/GatheringBookmarkContainer.tsx b/src/containers/gathering/read/GatheringBookmarkContainer.tsx similarity index 100% rename from src/containers/gathering/GatheringBookmarkContainer.tsx rename to src/containers/gathering/read/GatheringBookmarkContainer.tsx diff --git a/src/containers/gathering/GatheringCardListContainer.tsx b/src/containers/gathering/read/GatheringCardListContainer.tsx similarity index 72% rename from src/containers/gathering/GatheringCardListContainer.tsx rename to src/containers/gathering/read/GatheringCardListContainer.tsx index 457f1f0a..6e85b626 100644 --- a/src/containers/gathering/GatheringCardListContainer.tsx +++ b/src/containers/gathering/read/GatheringCardListContainer.tsx @@ -1,11 +1,11 @@ "use client"; -import GatheringCardList from "@/components/gathering/GatheringCardList"; +import Pagination from "@/components/common/Pagination"; +import GatheringCardList from "@/components/gathering/read/GatheringCardList"; import GatheringItemSkeleton from "@/components/skeleton/common/GatheringItemSkeleton"; import { Gathering, GatheringsResponse } from "@/types/GatheringDto"; import { useSearchParams } from "next/navigation"; import { useEffect, useState } from "react"; -import GatheringPaginationContainer from "./GatheringPaginationContainer"; const SkeletonGatheringList = () => { return ( @@ -22,10 +22,18 @@ const GatheringCardListContainer = () => { const [totalElements, setTotalElements] = useState(1); const [elements, setElements] = useState([]); const [loading, setLoading] = useState(true); - const [page, setPage] = useState( + const [currentPage, setCurrentPage] = useState( searchParams.get("page") ? Number(searchParams.get("page")) : 1, ); + const pageHandler = (page: number) => { + const url = new URL(window.location.href); + const params = new URLSearchParams(url.search); + params.set("page", page + ""); + url.search = params.toString(); + window.history.pushState({}, "", url.toString()); + }; + useEffect(() => { const temp = async () => { try { @@ -45,13 +53,13 @@ const GatheringCardListContainer = () => { if (!response.ok) { setElements([]); setTotalElements(0); - setPage(0); + setCurrentPage(0); return; } const data: GatheringsResponse = await response.json(); setElements(data.content); setTotalElements(data.totalElements); - setPage(params.get("page") ? Number(params.get("page")) + 1 : 1); + setCurrentPage(params.get("page") ? Number(params.get("page")) + 1 : 1); } finally { setLoading(false); } @@ -66,13 +74,13 @@ const GatheringCardListContainer = () => { ) : ( <> - { - elements.length != 0 && - - } + )} )} diff --git a/src/containers/gathering/GatheringCategoryListContainer.tsx b/src/containers/gathering/read/GatheringCategoryListContainer.tsx similarity index 100% rename from src/containers/gathering/GatheringCategoryListContainer.tsx rename to src/containers/gathering/read/GatheringCategoryListContainer.tsx diff --git a/src/containers/gathering/GatheringExcludeCompleteContainer.tsx b/src/containers/gathering/read/GatheringExcludeCompleteContainer.tsx similarity index 100% rename from src/containers/gathering/GatheringExcludeCompleteContainer.tsx rename to src/containers/gathering/read/GatheringExcludeCompleteContainer.tsx diff --git a/src/containers/gathering/GatheringFilterContainer.tsx b/src/containers/gathering/read/GatheringFilterContainer.tsx similarity index 89% rename from src/containers/gathering/GatheringFilterContainer.tsx rename to src/containers/gathering/read/GatheringFilterContainer.tsx index 12c52549..6050f2a2 100644 --- a/src/containers/gathering/GatheringFilterContainer.tsx +++ b/src/containers/gathering/read/GatheringFilterContainer.tsx @@ -1,5 +1,5 @@ import { Modal } from "@/components/common/modal/Modal"; -import GatheringFilterModal from "@/components/gathering/GatheringFilterModal"; +import GatheringFilterModal from "@/components/gathering/read/modal/GatheringFilterModal"; import { useState } from "react"; import { VscSettings } from "react-icons/vsc"; diff --git a/src/containers/gathering/GatheringLikeContainer.tsx b/src/containers/gathering/read/GatheringLikeContainer.tsx similarity index 95% rename from src/containers/gathering/GatheringLikeContainer.tsx rename to src/containers/gathering/read/GatheringLikeContainer.tsx index afe98595..ac79c13d 100644 --- a/src/containers/gathering/GatheringLikeContainer.tsx +++ b/src/containers/gathering/read/GatheringLikeContainer.tsx @@ -1,5 +1,5 @@ "use client"; -import GatheringLike from "@/components/gathering/write/GatheringLike"; +import GatheringLike from "@/components/gathering/read/GatheringLike"; import useAuthStore from "@/store/authStore"; import { fetchWithAuth } from "@/utils/fetchWithAuth"; import { useState } from "react"; diff --git a/src/containers/gathering/GatheringListContainer.tsx b/src/containers/gathering/read/GatheringListContainer.tsx similarity index 86% rename from src/containers/gathering/GatheringListContainer.tsx rename to src/containers/gathering/read/GatheringListContainer.tsx index 156fb217..563b58d4 100644 --- a/src/containers/gathering/GatheringListContainer.tsx +++ b/src/containers/gathering/read/GatheringListContainer.tsx @@ -1,6 +1,6 @@ "use client"; -import GatheringList from "@/components/gathering/GatheringList"; +import GatheringList from "@/components/gathering/read/GatheringList"; import { GatheringCategoryListType } from "@/types/GatheringCategoryDto"; interface IgatheringCategoryList { diff --git a/src/containers/gathering/GatheringSearchContainer.tsx b/src/containers/gathering/read/GatheringSearchContainer.tsx similarity index 97% rename from src/containers/gathering/GatheringSearchContainer.tsx rename to src/containers/gathering/read/GatheringSearchContainer.tsx index af4c0e85..0f15998d 100644 --- a/src/containers/gathering/GatheringSearchContainer.tsx +++ b/src/containers/gathering/read/GatheringSearchContainer.tsx @@ -1,4 +1,4 @@ -import GatheringSearch from "@/components/gathering/GatheringSearch"; +import GatheringSearch from "@/components/gathering/read/GatheringSearch"; import { useSearchParams } from 'next/navigation'; import { useEffect, useState } from "react"; diff --git a/src/containers/gathering/GatheringSortContainer.tsx b/src/containers/gathering/read/GatheringSortContainer.tsx similarity index 100% rename from src/containers/gathering/GatheringSortContainer.tsx rename to src/containers/gathering/read/GatheringSortContainer.tsx diff --git a/src/containers/gathering/GatheringApplicantListContainer.tsx b/src/containers/gathering/read/detail/GatheringApplicantListContainer.tsx similarity index 94% rename from src/containers/gathering/GatheringApplicantListContainer.tsx rename to src/containers/gathering/read/detail/GatheringApplicantListContainer.tsx index 65529eaf..e66b14fa 100644 --- a/src/containers/gathering/GatheringApplicantListContainer.tsx +++ b/src/containers/gathering/read/detail/GatheringApplicantListContainer.tsx @@ -1,6 +1,6 @@ "use client" -import GatheringApplicantList from "@/components/gathering/GatheringApplicantList"; +import GatheringApplicantList from "@/components/gathering/read/detail/GatheringApplicantList"; import useAuthStore from "@/store/authStore"; import { fetchWithAuth } from "@/utils/fetchWithAuth"; import { useParams } from "next/navigation"; diff --git a/src/components/gathering/modal/GatheringDeleteModalContainer.tsx b/src/containers/gathering/read/detail/GatheringDeleteModalContainer.tsx similarity index 100% rename from src/components/gathering/modal/GatheringDeleteModalContainer.tsx rename to src/containers/gathering/read/detail/GatheringDeleteModalContainer.tsx diff --git a/src/containers/gathering/GatheringSupportManagementContainer.tsx b/src/containers/gathering/read/detail/GatheringSupportManagementContainer.tsx similarity index 94% rename from src/containers/gathering/GatheringSupportManagementContainer.tsx rename to src/containers/gathering/read/detail/GatheringSupportManagementContainer.tsx index b29f5664..e8d78f22 100644 --- a/src/containers/gathering/GatheringSupportManagementContainer.tsx +++ b/src/containers/gathering/read/detail/GatheringSupportManagementContainer.tsx @@ -1,4 +1,4 @@ -import GatheringSupportManagement from "@/components/gathering/GatheringSupportManagement"; +import GatheringSupportManagement from "@/components/gathering/read/detail/GatheringSupportManagement"; import useAuthStore from "@/store/authStore"; import { useParams } from "next/navigation"; import { useState } from "react"; diff --git a/src/components/gathering/GatheringViewerContainer.tsx b/src/containers/gathering/read/detail/GatheringViewerContainer.tsx similarity index 84% rename from src/components/gathering/GatheringViewerContainer.tsx rename to src/containers/gathering/read/detail/GatheringViewerContainer.tsx index b08e61b2..f0bf10c3 100644 --- a/src/components/gathering/GatheringViewerContainer.tsx +++ b/src/containers/gathering/read/detail/GatheringViewerContainer.tsx @@ -2,7 +2,7 @@ import useModalState from "@/hooks/useModalState"; import { GatheringDetailResponseDto } from "@/types/GatheringDto"; -import GatheringViewer from "./GatheringViewer"; +import GatheringViewer from "../../../../components/gathering/read/detail/GatheringViewer"; interface IGatheringViewerContainer { data: GatheringDetailResponseDto;