From 4356ea2fa1ca40a2db010c3e428225eb5f39db2d Mon Sep 17 00:00:00 2001 From: suwonthugger <127329855+suwonthugger@users.noreply.github.com> Date: Thu, 2 Jan 2025 03:01:04 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20shared=20=ED=8F=B4=EB=8D=94=20?= =?UTF-8?q?=EA=B5=AC=EC=A1=B0=20=EC=BB=A8=EB=B2=A4=EC=85=98=EC=97=90=20?= =?UTF-8?q?=EB=A7=9E=EC=B6=94=EC=96=B4=20=EC=A0=95=EB=A6=AC=20(#230)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AllowedServicePage/AllowedServicePage.tsx | 2 +- .../BoxMakeAllowedService.tsx | 10 ++--- .../ColorPallete/ColorPallete.tsx | 2 +- .../BoxRecommendService.tsx | 6 +-- .../BoxAllowedServiceItem.tsx | 2 +- .../HomePage/BoxCategory/BoxCategory.tsx | 4 +- .../StatusAddBoxTodayTodo.tsx | 2 +- .../StatusDefaultBoxTodayTodo.tsx | 2 +- src/pages/HomePage/DatePicker/DatePicker.tsx | 9 ++--- src/pages/HomePage/HomePage.tsx | 2 +- .../ButtonCategoryCommon.tsx | 0 .../CalendarSelectedDate.tsx | 0 .../CategoryCommonMoribSet.tsx | 0 .../CategoryMsetUrlInfo.tsx | 2 +- .../InputCategoryUrl}/InputCategoryUrl.tsx | 2 +- .../ButtonCategoryDropdown.tsx | 12 ++++-- .../DropdownCategory}/DropdownCategory.tsx | 7 ++-- .../ModalAddCategoryList.tsx} | 17 ++++----- .../TitleMoribSet}/TitleMoribSet.tsx | 3 +- .../ModalContentsCategory.tsx | 20 +++++----- .../ButtonCategoryTab}/ButtonCategoryTab.tsx | 6 +-- .../TabCategorySelect/TabCategorySelect.tsx} | 8 ++-- .../FriendsListRequested.tsx | 6 +-- .../ButtonSendRequest}/ButtonSendRequest.tsx | 0 .../InputSendRequest/InputSendRequest.tsx | 4 +- .../FriendUserProfile}/FriendUserProfile.tsx | 0 .../FriendInfo.tsx | 13 ++++--- .../FriendsList/FriendsList.tsx | 8 ++-- .../StatusDefaultHome/StatusDefaultHome.tsx | 2 +- src/pages/LoginPage/LoginPage.tsx | 4 +- .../LoginPage}/hooks/useLottieAnimation.ts | 0 src/pages/NotFoundPage/NotFoundPage.tsx | 2 +- .../OnboardingPage/StepField/StepField.tsx | 2 +- .../BoxAllowedService/BoxAllowedService.tsx | 7 +++- .../ButtonService/ButtonService.tsx | 2 +- .../StepService/StepService.tsx | 2 +- .../OnboardingPage/StepService/Tabs/Tabs.tsx | 2 +- .../OnboardingPage/StepStart/StepStart.tsx | 4 +- src/pages/TimerPage/Carousel/Carousel.tsx | 2 +- src/pages/TimerPage/TimerPage.tsx | 7 ++-- src/pages/TimerPage/hooks/index.ts | 3 -- .../TimerPage}/hooks/useUrlHandler.ts | 4 +- src/shared/assets/home/svgs/index.ts | 7 ---- .../assets/{home => }/svgs/ic_back_btn.svg | 0 .../assets/{home => }/svgs/ic_color.svg | 0 .../Sidebar => }/assets/svgs/ic_folder.svg | 0 .../Sidebar => }/assets/svgs/ic_gear.svg | 0 .../Sidebar => }/assets/svgs/ic_logo.svg | 0 .../assets/{home => }/svgs/ic_minus.svg | 0 .../assets/{home => }/svgs/ic_pencil.svg | 0 .../{home => }/svgs/ic_service_design.svg | 0 .../{home => }/svgs/ic_service_design_sm.svg | 0 .../{home => }/svgs/onboarding_image.svg | 0 .../ButtonArrowSVG/ButtonArrowSVG.tsx | 0 .../ButtonDropdownOptions.tsx | 2 +- .../ButtonHomeLarge/ButtonHomeLarge.tsx | 0 .../ButtonStatusToggle.tsx | 0 .../ButtonCalendarAddRoutine.tsx | 0 .../components/{ => Calendar}/Calendar.tsx | 6 +-- .../HeaderCalendar}/HeaderCalendar.tsx | 0 .../components/{ => Calendar}/calendar.css | 0 .../{ => CircleColorIcon}/CircleColorIcon.tsx | 0 .../components/{ => Dropdown}/Dropdown.tsx | 2 +- .../ErrorBoundary/GlobalErrorBoundary.tsx | 2 +- .../FallbackApiError.tsx | 2 +- src/shared/components/LoadingUrl.tsx | 14 ------- src/shared/components/ModalCategory.tsx | 38 ------------------- .../{ => ModalWrapper}/ModalWrapper.tsx | 2 +- .../{ => ModalWrapper/styles}/dialog.css | 0 src/shared/layout/Layout.tsx | 2 +- .../AccountContent}/AccountContent.tsx | 27 ++++++------- .../ButtonSettingSaved.tsx | 0 .../ModalContentsSetting.tsx | 6 +-- .../ModalContentsSetting/Tabs}/Tabs.tsx | 2 +- .../WorkspaceSettingContent.tsx | 10 ++--- .../{components => }/Sidebar/Sidebar.tsx | 9 +++-- .../components/Sidebar/assets/svgs/index.ts | 3 -- .../Sidebar/components/ModalContents/index.ts | 1 - 78 files changed, 137 insertions(+), 190 deletions(-) rename src/{shared/components => pages/HomePage/ModalContentsCategory/ButtonCategoryCommon}/ButtonCategoryCommon.tsx (100%) rename src/{shared/components => pages/HomePage/ModalContentsCategory/CalendarSelectedDate}/CalendarSelectedDate.tsx (100%) rename src/{shared/components => pages/HomePage/ModalContentsCategory/CategoryCommonMoribSet}/CategoryCommonMoribSet.tsx (100%) rename src/{shared/components => pages/HomePage/ModalContentsCategory/CategoryMsetUrlInfo}/CategoryMsetUrlInfo.tsx (95%) rename src/{shared/components => pages/HomePage/ModalContentsCategory/InputCategoryUrl}/InputCategoryUrl.tsx (97%) rename src/{shared/components => pages/HomePage/ModalContentsCategory/ModalAddCategoryList/DropdownCategory/ButtonCategoryDropdown}/ButtonCategoryDropdown.tsx (81%) rename src/{shared/components => pages/HomePage/ModalContentsCategory/ModalAddCategoryList/DropdownCategory}/DropdownCategory.tsx (89%) rename src/{shared/components/AddCategoryListModal.tsx => pages/HomePage/ModalContentsCategory/ModalAddCategoryList/ModalAddCategoryList.tsx} (90%) rename src/{shared/components => pages/HomePage/ModalContentsCategory/ModalAddCategoryList/TitleMoribSet}/TitleMoribSet.tsx (82%) rename src/{shared/components => pages/HomePage/ModalContentsCategory/TabCategorySelect/ButtonCategoryTab}/ButtonCategoryTab.tsx (68%) rename src/{shared/components/CategoryTabSelect.tsx => pages/HomePage/ModalContentsCategory/TabCategorySelect/TabCategorySelect.tsx} (63%) rename src/{shared/components/ModalContents => pages/HomePage/ModalContentsFriends/FriendRequest/InputSendRequest/ButtonSendRequest}/ButtonSendRequest.tsx (100%) rename src/{shared/components/ModalContents => pages/HomePage/ModalContentsFriends/FriendUserProfile}/FriendUserProfile.tsx (100%) rename src/pages/HomePage/ModalContentsFriends/FriendsList/{components => FriendsInfo}/FriendInfo.tsx (76%) rename src/{shared => pages/LoginPage}/hooks/useLottieAnimation.ts (100%) delete mode 100644 src/pages/TimerPage/hooks/index.ts rename src/{shared => pages/TimerPage}/hooks/useUrlHandler.ts (96%) delete mode 100644 src/shared/assets/home/svgs/index.ts rename src/shared/assets/{home => }/svgs/ic_back_btn.svg (100%) rename src/shared/assets/{home => }/svgs/ic_color.svg (100%) rename src/shared/{layout/components/Sidebar => }/assets/svgs/ic_folder.svg (100%) rename src/shared/{layout/components/Sidebar => }/assets/svgs/ic_gear.svg (100%) rename src/shared/{layout/components/Sidebar => }/assets/svgs/ic_logo.svg (100%) rename src/shared/assets/{home => }/svgs/ic_minus.svg (100%) rename src/shared/assets/{home => }/svgs/ic_pencil.svg (100%) rename src/shared/assets/{home => }/svgs/ic_service_design.svg (100%) rename src/shared/assets/{home => }/svgs/ic_service_design_sm.svg (100%) rename src/shared/assets/{home => }/svgs/onboarding_image.svg (100%) rename src/shared/components/{Button => }/ButtonArrowSVG/ButtonArrowSVG.tsx (100%) rename src/shared/components/{ => ButtonDropdownOptions}/ButtonDropdownOptions.tsx (75%) rename src/shared/components/{Button => }/ButtonHomeLarge/ButtonHomeLarge.tsx (100%) rename src/shared/components/{ => ButtonStatusToggle}/ButtonStatusToggle.tsx (100%) rename src/shared/components/{ => Calendar/ButtonCalendarAddRoutine}/ButtonCalendarAddRoutine.tsx (100%) rename src/shared/components/{ => Calendar}/Calendar.tsx (95%) rename src/shared/components/{ => Calendar/HeaderCalendar}/HeaderCalendar.tsx (100%) rename src/shared/components/{ => Calendar}/calendar.css (100%) rename src/shared/components/{ => CircleColorIcon}/CircleColorIcon.tsx (100%) rename src/shared/components/{ => Dropdown}/Dropdown.tsx (98%) rename src/shared/components/{ => FallbackApiError}/FallbackApiError.tsx (90%) delete mode 100644 src/shared/components/LoadingUrl.tsx delete mode 100644 src/shared/components/ModalCategory.tsx rename src/shared/components/{ => ModalWrapper}/ModalWrapper.tsx (96%) rename src/shared/components/{ => ModalWrapper/styles}/dialog.css (100%) rename src/shared/layout/{components/Sidebar/components/ModalContents/Setting/components => Sidebar/ModalContentsSetting/AccountContent}/AccountContent.tsx (67%) rename src/shared/{components => layout/Sidebar/ModalContentsSetting/ButtonSettingSaved}/ButtonSettingSaved.tsx (100%) rename src/shared/layout/{components/Sidebar/components/ModalContents/Setting => Sidebar/ModalContentsSetting}/ModalContentsSetting.tsx (88%) rename src/shared/layout/{components/Sidebar/components/ModalContents/Setting/components => Sidebar/ModalContentsSetting/Tabs}/Tabs.tsx (93%) rename src/shared/layout/{components/Sidebar/components/ModalContents/Setting/components => Sidebar/ModalContentsSetting/WorkspaceSettingContent}/WorkspaceSettingContent.tsx (62%) rename src/shared/layout/{components => }/Sidebar/Sidebar.tsx (82%) delete mode 100644 src/shared/layout/components/Sidebar/assets/svgs/index.ts delete mode 100644 src/shared/layout/components/Sidebar/components/ModalContents/index.ts diff --git a/src/pages/AllowedServicePage/AllowedServicePage.tsx b/src/pages/AllowedServicePage/AllowedServicePage.tsx index d65ae98d..edc399ad 100644 --- a/src/pages/AllowedServicePage/AllowedServicePage.tsx +++ b/src/pages/AllowedServicePage/AllowedServicePage.tsx @@ -1,6 +1,6 @@ import { useEffect, useRef, useState } from 'react'; -import ModalWrapper, { ModalWrapperRef } from '@/shared/components/ModalWrapper'; +import ModalWrapper, { ModalWrapperRef } from '@/shared/components/ModalWrapper/ModalWrapper'; import useClickOutside from '@/shared/hooks/useClickOutside'; diff --git a/src/pages/AllowedServicePage/BoxMakeAllowedService/BoxMakeAllowedService.tsx b/src/pages/AllowedServicePage/BoxMakeAllowedService/BoxMakeAllowedService.tsx index 3171677d..c55b181b 100644 --- a/src/pages/AllowedServicePage/BoxMakeAllowedService/BoxMakeAllowedService.tsx +++ b/src/pages/AllowedServicePage/BoxMakeAllowedService/BoxMakeAllowedService.tsx @@ -1,18 +1,18 @@ import { ChangeEvent, useState } from 'react'; -import ArrowSVGBtn from '@/shared/components/Button/ButtonArrowSVG/ButtonArrowSVG'; -import CategoryTabSelect from '@/shared/components/CategoryTabSelect'; +import ArrowSVGBtn from '@/shared/components/ButtonArrowSVG/ButtonArrowSVG'; import { Direction } from '@/shared/types/global'; import { CATEGORY_MODALTABS } from '@/shared/constants/tabSelections'; -import { AllowedService } from '../types'; +import CategoryTabSelect from '@/pages/HomePage/ModalContentsCategory/TabCategorySelect/TabCategorySelect'; +import { AllowedService } from '../types'; +import BoxUrlList from './BoxUrlList/BoxUrlList'; import ColorPallete from './ColorPallete/ColorPallete'; import InputAllowedServiceUrl from './InputAllowedServiceUrl/InputAllowedServiceUrl'; import TableAllowedService from './TableAllowedService/TableAllowedService'; -import BoxUrlList from './BoxUrlList/BoxUrlList'; interface BoxMakeAllowedServiceProps { allowedService: AllowedService; @@ -75,7 +75,7 @@ const BoxMakeAllowedService = ({ allowedService, updateAllowedService }: BoxMake value={allowedServiceName} onChange={handleMoribNameChange} placeholder="모립세트 이름을 입력해주세요." - className="title-bold-36 placeholder-text-gray-03 w-[114rem] flex-shrink-0 bg-transparent text-white focus:outline-none" + className="placeholder-text-gray-03 w-[114rem] flex-shrink-0 bg-transparent text-white title-bold-36 focus:outline-none" /> diff --git a/src/pages/AllowedServicePage/BoxMakeAllowedService/ColorPallete/ColorPallete.tsx b/src/pages/AllowedServicePage/BoxMakeAllowedService/ColorPallete/ColorPallete.tsx index d2393a51..8bed579d 100644 --- a/src/pages/AllowedServicePage/BoxMakeAllowedService/ColorPallete/ColorPallete.tsx +++ b/src/pages/AllowedServicePage/BoxMakeAllowedService/ColorPallete/ColorPallete.tsx @@ -1,4 +1,4 @@ -import CircleColorIcon from '@/shared/components/CircleColorIcon'; +import CircleColorIcon from '@/shared/components/CircleColorIcon/CircleColorIcon'; import { colors } from '@/shared/constants/colorPallete'; diff --git a/src/pages/AllowedServicePage/BoxRecommendService/BoxRecommendService.tsx b/src/pages/AllowedServicePage/BoxRecommendService/BoxRecommendService.tsx index 9fc39a34..fd5af83a 100644 --- a/src/pages/AllowedServicePage/BoxRecommendService/BoxRecommendService.tsx +++ b/src/pages/AllowedServicePage/BoxRecommendService/BoxRecommendService.tsx @@ -1,6 +1,6 @@ import { useRef, useState } from 'react'; -import ArrowSVGBtn from '@/shared/components/Button/ButtonArrowSVG/ButtonArrowSVG'; +import ArrowSVGBtn from '@/shared/components/ButtonArrowSVG/ButtonArrowSVG'; import { Direction } from '@/shared/types/global'; @@ -41,7 +41,7 @@ const BoxRecommendService = ({ addUrlToAllowedService }: BoxRecommendServiceProp return (
-

추천 서비스

+

추천 서비스

-

{service.serviceName}

+

{service.serviceName}

))}
diff --git a/src/pages/AllowedServicePage/CategoryAllowedService/BoxAllowedServiceItem/BoxAllowedServiceItem.tsx b/src/pages/AllowedServicePage/CategoryAllowedService/BoxAllowedServiceItem/BoxAllowedServiceItem.tsx index a9a507cd..86d2c046 100644 --- a/src/pages/AllowedServicePage/CategoryAllowedService/BoxAllowedServiceItem/BoxAllowedServiceItem.tsx +++ b/src/pages/AllowedServicePage/CategoryAllowedService/BoxAllowedServiceItem/BoxAllowedServiceItem.tsx @@ -1,4 +1,4 @@ -import Dropdown from '@/shared/components/Dropdown'; +import Dropdown from '@/shared/components/Dropdown/Dropdown'; import IconMeatBall from '@/shared/assets/svgs/todo_meatball_default.svg?react'; diff --git a/src/pages/HomePage/BoxCategory/BoxCategory.tsx b/src/pages/HomePage/BoxCategory/BoxCategory.tsx index 3f1f7c41..f30a1ec3 100644 --- a/src/pages/HomePage/BoxCategory/BoxCategory.tsx +++ b/src/pages/HomePage/BoxCategory/BoxCategory.tsx @@ -20,7 +20,7 @@ import BoxTodoInput from './BoxTodoInput/BoxTodoInput'; import StatusDefaultBoxCategory from './StatusDefaultBoxCategory/StatusDefaultBoxCategory'; import { useCreateTodo } from './hooks/useCreateTodo'; -const Calendar = lazy(() => import('@/shared/components/Calendar')); +const Calendar = lazy(() => import('@/shared/components/Calendar/Calendar')); interface BoxCategoryProps { id: number; @@ -107,7 +107,7 @@ const BoxCategory = ({ } const handleMouseEnter = () => { - import('@/shared/components/Calendar').catch((error) => { + import('@/shared/components/Calendar/Calendar').catch((error) => { console.error('캘린더를 받아오는데 오류가 발생했습니다.', error); }); }; diff --git a/src/pages/HomePage/BoxTodayTodo/StatusAddBoxTodayTodo/StatusAddBoxTodayTodo.tsx b/src/pages/HomePage/BoxTodayTodo/StatusAddBoxTodayTodo/StatusAddBoxTodayTodo.tsx index 36bb64ae..a7755be0 100644 --- a/src/pages/HomePage/BoxTodayTodo/StatusAddBoxTodayTodo/StatusAddBoxTodayTodo.tsx +++ b/src/pages/HomePage/BoxTodayTodo/StatusAddBoxTodayTodo/StatusAddBoxTodayTodo.tsx @@ -1,5 +1,5 @@ import BoxTodo from '@/shared/components/BoxTodo/BoxTodo'; -import HomeLargeBtn from '@/shared/components/Button/ButtonHomeLarge/ButtonHomeLarge'; +import HomeLargeBtn from '@/shared/components/ButtonHomeLarge/ButtonHomeLarge'; import { HomeLargeBtnVariant } from '@/shared/types/global'; import { Task } from '@/shared/types/home'; diff --git a/src/pages/HomePage/BoxTodayTodo/StatusDefaultBoxTodayTodo/StatusDefaultBoxTodayTodo.tsx b/src/pages/HomePage/BoxTodayTodo/StatusDefaultBoxTodayTodo/StatusDefaultBoxTodayTodo.tsx index 96094182..b64f5a72 100644 --- a/src/pages/HomePage/BoxTodayTodo/StatusDefaultBoxTodayTodo/StatusDefaultBoxTodayTodo.tsx +++ b/src/pages/HomePage/BoxTodayTodo/StatusDefaultBoxTodayTodo/StatusDefaultBoxTodayTodo.tsx @@ -1,4 +1,4 @@ -import HomeLargeBtn from '@/shared/components/Button/ButtonHomeLarge/ButtonHomeLarge'; +import HomeLargeBtn from '@/shared/components/ButtonHomeLarge/ButtonHomeLarge'; import { HomeLargeBtnVariant } from '@/shared/types/global'; diff --git a/src/pages/HomePage/DatePicker/DatePicker.tsx b/src/pages/HomePage/DatePicker/DatePicker.tsx index 3c2fa18a..a5d9f8c7 100644 --- a/src/pages/HomePage/DatePicker/DatePicker.tsx +++ b/src/pages/HomePage/DatePicker/DatePicker.tsx @@ -1,8 +1,8 @@ import { Dayjs } from 'dayjs'; -import ArrowSVGBtn from '@/shared/components/Button/ButtonArrowSVG/ButtonArrowSVG'; -import ButtonDropdownOptions from '@/shared/components/ButtonDropdownOptions'; -import Dropdown from '@/shared/components/Dropdown'; +import ArrowSVGBtn from '@/shared/components/ButtonArrowSVG/ButtonArrowSVG'; +import ButtonDropdownOptions from '@/shared/components/ButtonDropdownOptions/ButtonDropdownOptions'; +import Dropdown from '@/shared/components/Dropdown/Dropdown'; import { getHomeDropdownData } from '@/shared/utils/date'; @@ -11,8 +11,7 @@ import { Direction } from '@/shared/types/global'; import ButtonArrowIcon from '@/shared/assets/svgs/btn_arrow.svg?react'; import ButtonTodayIcon from '@/shared/assets/svgs/btn_today.svg?react'; -import DateBtn from '@/pages/HomePage/DatePicker/ButtonDate/ButtonDate'; - +import DateBtn from './ButtonDate/ButtonDate'; import { useDatePicker } from './hooks/useDatePicker'; interface DatePickerProps { diff --git a/src/pages/HomePage/HomePage.tsx b/src/pages/HomePage/HomePage.tsx index b2fd5bc9..6a59ab36 100644 --- a/src/pages/HomePage/HomePage.tsx +++ b/src/pages/HomePage/HomePage.tsx @@ -7,7 +7,7 @@ import { useNavigate } from 'react-router-dom'; import { useQueryClient } from '@tanstack/react-query'; -import ModalWrapper, { ModalWrapperRef } from '@/shared/components/ModalWrapper'; +import ModalWrapper, { ModalWrapperRef } from '@/shared/components/ModalWrapper/ModalWrapper'; import useClickOutside from '@/shared/hooks/useClickOutside'; diff --git a/src/shared/components/ButtonCategoryCommon.tsx b/src/pages/HomePage/ModalContentsCategory/ButtonCategoryCommon/ButtonCategoryCommon.tsx similarity index 100% rename from src/shared/components/ButtonCategoryCommon.tsx rename to src/pages/HomePage/ModalContentsCategory/ButtonCategoryCommon/ButtonCategoryCommon.tsx diff --git a/src/shared/components/CalendarSelectedDate.tsx b/src/pages/HomePage/ModalContentsCategory/CalendarSelectedDate/CalendarSelectedDate.tsx similarity index 100% rename from src/shared/components/CalendarSelectedDate.tsx rename to src/pages/HomePage/ModalContentsCategory/CalendarSelectedDate/CalendarSelectedDate.tsx diff --git a/src/shared/components/CategoryCommonMoribSet.tsx b/src/pages/HomePage/ModalContentsCategory/CategoryCommonMoribSet/CategoryCommonMoribSet.tsx similarity index 100% rename from src/shared/components/CategoryCommonMoribSet.tsx rename to src/pages/HomePage/ModalContentsCategory/CategoryCommonMoribSet/CategoryCommonMoribSet.tsx diff --git a/src/shared/components/CategoryMsetUrlInfo.tsx b/src/pages/HomePage/ModalContentsCategory/CategoryMsetUrlInfo/CategoryMsetUrlInfo.tsx similarity index 95% rename from src/shared/components/CategoryMsetUrlInfo.tsx rename to src/pages/HomePage/ModalContentsCategory/CategoryMsetUrlInfo/CategoryMsetUrlInfo.tsx index efe5861b..c2fddd71 100644 --- a/src/shared/components/CategoryMsetUrlInfo.tsx +++ b/src/pages/HomePage/ModalContentsCategory/CategoryMsetUrlInfo/CategoryMsetUrlInfo.tsx @@ -32,7 +32,7 @@ const CategoryMsetUrlInfo = ({ urlInfo, variant, children }: CategoryMoribPageIn
favicon -

+

{urlInfo.domain}

diff --git a/src/shared/components/InputCategoryUrl.tsx b/src/pages/HomePage/ModalContentsCategory/InputCategoryUrl/InputCategoryUrl.tsx similarity index 97% rename from src/shared/components/InputCategoryUrl.tsx rename to src/pages/HomePage/ModalContentsCategory/InputCategoryUrl/InputCategoryUrl.tsx index 92d72e20..122e57b9 100644 --- a/src/shared/components/InputCategoryUrl.tsx +++ b/src/pages/HomePage/ModalContentsCategory/InputCategoryUrl/InputCategoryUrl.tsx @@ -78,7 +78,7 @@ const InputCategoryUrl = ({ />
-
{errorMessage}
+
{errorMessage}
); diff --git a/src/shared/components/ButtonCategoryDropdown.tsx b/src/pages/HomePage/ModalContentsCategory/ModalAddCategoryList/DropdownCategory/ButtonCategoryDropdown/ButtonCategoryDropdown.tsx similarity index 81% rename from src/shared/components/ButtonCategoryDropdown.tsx rename to src/pages/HomePage/ModalContentsCategory/ModalAddCategoryList/DropdownCategory/ButtonCategoryDropdown/ButtonCategoryDropdown.tsx index 1a18360f..1ee396be 100644 --- a/src/shared/components/ButtonCategoryDropdown.tsx +++ b/src/pages/HomePage/ModalContentsCategory/ModalAddCategoryList/DropdownCategory/ButtonCategoryDropdown/ButtonCategoryDropdown.tsx @@ -4,13 +4,19 @@ import DisabledDropIcon from '@/shared/assets/svgs/disabled_dropdown.svg?react'; import DropIcon from '@/shared/assets/svgs/dropIcon.svg?react'; import UpIcon from '@/shared/assets/svgs/upIcon.svg?react'; -interface CategoryBtnProps extends ButtonHTMLAttributes { +interface ButtonCategoryDropdownProps extends ButtonHTMLAttributes { isClicked: boolean; handleClicked: (prev: boolean) => void; selectedOption: string; } -const CategoryDropdownBtn = ({ isClicked, handleClicked, selectedOption, disabled, ...props }: CategoryBtnProps) => { +const ButtonCategoryDropdown = ({ + isClicked, + handleClicked, + selectedOption, + disabled, + ...props +}: ButtonCategoryDropdownProps) => { const clickedDropdownStyle = isClicked ? 'bg-gray-bg-05 text-white' : 'bg-gray-bg-03 text-white'; const commonBtnStyle = `subhead-med-18 flex h-[4.6rem] w-[27.2rem] items-center justify-between rounded-[5px] px-[1.6rem] py-[1.1rem] mb-[3.2rem]`; @@ -40,4 +46,4 @@ const CategoryDropdownBtn = ({ isClicked, handleClicked, selectedOption, disable ); }; -export default CategoryDropdownBtn; +export default ButtonCategoryDropdown; diff --git a/src/shared/components/DropdownCategory.tsx b/src/pages/HomePage/ModalContentsCategory/ModalAddCategoryList/DropdownCategory/DropdownCategory.tsx similarity index 89% rename from src/shared/components/DropdownCategory.tsx rename to src/pages/HomePage/ModalContentsCategory/ModalAddCategoryList/DropdownCategory/DropdownCategory.tsx index c5f60a7b..584173bd 100644 --- a/src/shared/components/DropdownCategory.tsx +++ b/src/pages/HomePage/ModalContentsCategory/ModalAddCategoryList/DropdownCategory/DropdownCategory.tsx @@ -2,11 +2,12 @@ import { ButtonHTMLAttributes, useRef } from 'react'; import { useQueryClient } from '@tanstack/react-query'; -import ButtonCategoryDropdown from '@/shared/components/ButtonCategoryDropdown'; -import ButtonDropdownOptions from '@/shared/components/ButtonDropdownOptions'; +import ButtonDropdownOptions from '@/shared/components/ButtonDropdownOptions/ButtonDropdownOptions'; import useClickOutside from '@/shared/hooks/useClickOutside'; +import ButtonCategoryDropdown from './ButtonCategoryDropdown/ButtonCategoryDropdown'; + interface DropdownBtnProps extends ButtonHTMLAttributes { optionData: Category[]; handleOptionId: (id: number) => void; @@ -64,7 +65,7 @@ const DropdownCategory = ({ return (
  • { diff --git a/src/shared/components/AddCategoryListModal.tsx b/src/pages/HomePage/ModalContentsCategory/ModalAddCategoryList/ModalAddCategoryList.tsx similarity index 90% rename from src/shared/components/AddCategoryListModal.tsx rename to src/pages/HomePage/ModalContentsCategory/ModalAddCategoryList/ModalAddCategoryList.tsx index c5e471dd..74b80f39 100644 --- a/src/shared/components/AddCategoryListModal.tsx +++ b/src/pages/HomePage/ModalContentsCategory/ModalAddCategoryList/ModalAddCategoryList.tsx @@ -1,11 +1,5 @@ import { useState } from 'react'; -import ButtonCategoryCommon from '@/shared/components/ButtonCategoryCommon'; -import CategoryMsetUrlInfo from '@/shared/components/CategoryMsetUrlInfo'; -import CategoryTabSelect from '@/shared/components/CategoryTabSelect'; -import DropdownCategory from '@/shared/components/DropdownCategory'; -import TitleMoribSet from '@/shared/components/TitleMoribSet'; - import { getTabName } from '@/shared/apis/modal/axios'; import { useCategoryLists, useGetMsets } from '@/shared/apis/modal/queries'; @@ -14,8 +8,13 @@ import { CATEGORY_MODALTABS } from '@/shared/constants/tabSelections'; import AddBtn from '@/shared/assets/svgs/add_btn.svg?react'; import MinusBtn from '@/shared/assets/svgs/minus_btn.svg?react'; -import CategoryCommonMoribSet from './CategoryCommonMoribSet'; -import InputCategoryUrl from './InputCategoryUrl'; +import ButtonCategoryCommon from '../ButtonCategoryCommon/ButtonCategoryCommon'; +import CategoryCommonMoribSet from '../CategoryCommonMoribSet/CategoryCommonMoribSet'; +import CategoryMsetUrlInfo from '../CategoryMsetUrlInfo/CategoryMsetUrlInfo'; +import InputCategoryUrl from '../InputCategoryUrl/InputCategoryUrl'; +import DropdownCategory from '../ModalAddCategoryList/DropdownCategory/DropdownCategory'; +import TitleMoribSet from '../ModalAddCategoryList/TitleMoribSet/TitleMoribSet'; +import CategoryTabSelect from '../TabCategorySelect/TabCategorySelect'; interface UrlInfo { url: string; @@ -100,7 +99,7 @@ const AddCategoryListModal = ({
    -

    카테고리 추가

    +

    카테고리 추가