From ec9e9e760f18a56d23d9de164fb75f82950dd55b Mon Sep 17 00:00:00 2001 From: suwonthugger <127329855+suwonthugger@users.noreply.github.com> Date: Sat, 21 Dec 2024 21:30:00 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20import=20=EB=AC=B8=20=EA=B5=AC=EB=B6=84?= =?UTF-8?q?=EC=9D=84=20=EC=9C=84=ED=95=B4=20=ED=8F=B4=EB=8D=94=20=EA=B5=AC?= =?UTF-8?q?=EC=A1=B0=20=EB=B0=B0=EB=9F=B4=ED=8C=8C=EC=9D=BC=20=EA=B5=AC?= =?UTF-8?q?=EC=A1=B0=EB=A1=9C=20=EB=B3=80=EA=B2=BD=20(#230)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{ => Box}/BoxCategory/BoxCategory.tsx | 2 +- .../BoxCategory/BoxTodoInput/BoxTodoInput.tsx | 2 +- .../StatusDefaultBoxCategory.tsx | 0 .../{ => Box}/BoxTodayTodo/BoxTodayTodo.tsx | 0 .../StatusAddBoxTodayTodo.tsx | 0 .../StatusDefaultBoxTodayTodo.tsx | 0 src/pages/HomePage/Box/index.ts | 2 ++ .../ButtonMoreFriends/ButtonMoreFriends.tsx | 0 .../ButtonUserProfile/ButtonUserProfile.tsx | 0 src/pages/HomePage/Button/index.ts | 2 ++ src/pages/HomePage/HomePage.tsx | 10 ++++------ .../ButtonAlert/ButtonAlert.tsx | 0 .../Complete}/Complete.tsx | 4 ++-- .../DeleteAccount}/DeleteAccount.tsx | 4 ++-- .../Logoout}/Logout.tsx | 4 ++-- .../ModalContentsAlert/ModalContentsAlert.tsx | 11 +++++++++++ .../ModalContentsAlert/types/index.ts | 0 .../ModalContentsCategory.tsx | 0 .../ButtonRequestAction}/ButtonRequestAction.tsx | 0 .../FriendsListRequested.tsx | 0 .../FriendRequest}/FriendsRequest.tsx | 10 +++++----- .../InputSendRequest}/InputSendRequest.tsx | 0 .../FriendsList/FriendsList.tsx | 0 .../FriendsList/components/FriendInfo.tsx | 0 .../ModalContentsFriends.tsx | 10 +++++----- .../ModalContentsAlert/ModalContentsAlert.tsx | 16 ---------------- src/pages/HomePage/ModalContents/index.ts | 5 +++-- 27 files changed, 40 insertions(+), 42 deletions(-) rename src/pages/HomePage/{ => Box}/BoxCategory/BoxCategory.tsx (98%) rename src/pages/HomePage/{ => Box}/BoxCategory/BoxTodoInput/BoxTodoInput.tsx (98%) rename src/pages/HomePage/{ => Box}/BoxCategory/StatusDefaultBoxCategory/StatusDefaultBoxCategory.tsx (100%) rename src/pages/HomePage/{ => Box}/BoxTodayTodo/BoxTodayTodo.tsx (100%) rename src/pages/HomePage/{ => Box}/BoxTodayTodo/StatusAddBoxTodayTodo/StatusAddBoxTodayTodo.tsx (100%) rename src/pages/HomePage/{ => Box}/BoxTodayTodo/StatusDefaultBoxTodayTodo/StatusDefaultBoxTodayTodo.tsx (100%) create mode 100644 src/pages/HomePage/Box/index.ts rename src/pages/HomePage/{ => Button}/ButtonMoreFriends/ButtonMoreFriends.tsx (100%) rename src/pages/HomePage/{ => Button}/ButtonUserProfile/ButtonUserProfile.tsx (100%) create mode 100644 src/pages/HomePage/Button/index.ts rename src/pages/HomePage/ModalContents/{Setting => }/ModalContentsAlert/ButtonAlert/ButtonAlert.tsx (100%) rename src/pages/HomePage/ModalContents/{Setting/ModalContentsAlert => ModalContentsAlert/Complete}/Complete.tsx (82%) rename src/pages/HomePage/ModalContents/{Setting/ModalContentsAlert => ModalContentsAlert/DeleteAccount}/DeleteAccount.tsx (95%) rename src/pages/HomePage/ModalContents/{Setting/ModalContentsAlert => ModalContentsAlert/Logoout}/Logout.tsx (87%) create mode 100644 src/pages/HomePage/ModalContents/ModalContentsAlert/ModalContentsAlert.tsx rename src/pages/HomePage/ModalContents/{Setting => }/ModalContentsAlert/types/index.ts (100%) rename src/pages/HomePage/ModalContents/{Category => ModalContentsCategory}/ModalContentsCategory.tsx (100%) rename src/pages/HomePage/ModalContents/{Friends/components/FriendsRequest/components => ModalContentsFriends/FriendRequest/ButtonRequestAction}/ButtonRequestAction.tsx (100%) rename src/pages/HomePage/ModalContents/{Friends/components/FriendsRequest/components => ModalContentsFriends/FriendRequest/FriendsListRequested}/FriendsListRequested.tsx (100%) rename src/pages/HomePage/ModalContents/{Friends/components/FriendsRequest => ModalContentsFriends/FriendRequest}/FriendsRequest.tsx (61%) rename src/pages/HomePage/ModalContents/{Friends/components/FriendsRequest/components => ModalContentsFriends/FriendRequest/InputSendRequest}/InputSendRequest.tsx (100%) rename src/pages/HomePage/ModalContents/{Friends/components => ModalContentsFriends}/FriendsList/FriendsList.tsx (100%) rename src/pages/HomePage/ModalContents/{Friends/components => ModalContentsFriends}/FriendsList/components/FriendInfo.tsx (100%) rename src/pages/HomePage/ModalContents/{Friends => ModalContentsFriends}/ModalContentsFriends.tsx (73%) delete mode 100644 src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/ModalContentsAlert.tsx diff --git a/src/pages/HomePage/BoxCategory/BoxCategory.tsx b/src/pages/HomePage/Box/BoxCategory/BoxCategory.tsx similarity index 98% rename from src/pages/HomePage/BoxCategory/BoxCategory.tsx rename to src/pages/HomePage/Box/BoxCategory/BoxCategory.tsx index 9b4a8958..6ca9302c 100644 --- a/src/pages/HomePage/BoxCategory/BoxCategory.tsx +++ b/src/pages/HomePage/Box/BoxCategory/BoxCategory.tsx @@ -17,7 +17,7 @@ import { Task } from '@/shared/types/home'; import ButtonAddIcon from '@/shared/assets/svgs/btn_task_add.svg?react'; import MeatBallDefault from '@/shared/assets/svgs/todo_meatball_default.svg?react'; -import ButtonTodoToggle from '../../../shared/components/ButtonTodayToggle/ButtonTodoToggle'; +import ButtonTodoToggle from '../../../../shared/components/ButtonTodayToggle/ButtonTodoToggle'; import BoxTodoInput from './BoxTodoInput/BoxTodoInput'; import StatusDefaultBoxCategory from './StatusDefaultBoxCategory/StatusDefaultBoxCategory'; diff --git a/src/pages/HomePage/BoxCategory/BoxTodoInput/BoxTodoInput.tsx b/src/pages/HomePage/Box/BoxCategory/BoxTodoInput/BoxTodoInput.tsx similarity index 98% rename from src/pages/HomePage/BoxCategory/BoxTodoInput/BoxTodoInput.tsx rename to src/pages/HomePage/Box/BoxCategory/BoxTodoInput/BoxTodoInput.tsx index 35762609..ed0283d9 100644 --- a/src/pages/HomePage/BoxCategory/BoxTodoInput/BoxTodoInput.tsx +++ b/src/pages/HomePage/Box/BoxCategory/BoxTodoInput/BoxTodoInput.tsx @@ -7,7 +7,7 @@ import CheckBoxBlankIcon from '@/shared/assets/svgs/check_box_blank.svg?react'; import TimeLineIcon from '@/shared/assets/svgs/mingcute_time-line.svg?react'; import MeatBall from '@/shared/assets/svgs/todo_meatball_default.svg?react'; -import SVGBtn from '../../../../shared/components/ButtonSVG'; +import SVGBtn from '../../../../../shared/components/ButtonSVG'; interface BoxTodoInputProps { editable: boolean; diff --git a/src/pages/HomePage/BoxCategory/StatusDefaultBoxCategory/StatusDefaultBoxCategory.tsx b/src/pages/HomePage/Box/BoxCategory/StatusDefaultBoxCategory/StatusDefaultBoxCategory.tsx similarity index 100% rename from src/pages/HomePage/BoxCategory/StatusDefaultBoxCategory/StatusDefaultBoxCategory.tsx rename to src/pages/HomePage/Box/BoxCategory/StatusDefaultBoxCategory/StatusDefaultBoxCategory.tsx diff --git a/src/pages/HomePage/BoxTodayTodo/BoxTodayTodo.tsx b/src/pages/HomePage/Box/BoxTodayTodo/BoxTodayTodo.tsx similarity index 100% rename from src/pages/HomePage/BoxTodayTodo/BoxTodayTodo.tsx rename to src/pages/HomePage/Box/BoxTodayTodo/BoxTodayTodo.tsx diff --git a/src/pages/HomePage/BoxTodayTodo/StatusAddBoxTodayTodo/StatusAddBoxTodayTodo.tsx b/src/pages/HomePage/Box/BoxTodayTodo/StatusAddBoxTodayTodo/StatusAddBoxTodayTodo.tsx similarity index 100% rename from src/pages/HomePage/BoxTodayTodo/StatusAddBoxTodayTodo/StatusAddBoxTodayTodo.tsx rename to src/pages/HomePage/Box/BoxTodayTodo/StatusAddBoxTodayTodo/StatusAddBoxTodayTodo.tsx diff --git a/src/pages/HomePage/BoxTodayTodo/StatusDefaultBoxTodayTodo/StatusDefaultBoxTodayTodo.tsx b/src/pages/HomePage/Box/BoxTodayTodo/StatusDefaultBoxTodayTodo/StatusDefaultBoxTodayTodo.tsx similarity index 100% rename from src/pages/HomePage/BoxTodayTodo/StatusDefaultBoxTodayTodo/StatusDefaultBoxTodayTodo.tsx rename to src/pages/HomePage/Box/BoxTodayTodo/StatusDefaultBoxTodayTodo/StatusDefaultBoxTodayTodo.tsx diff --git a/src/pages/HomePage/Box/index.ts b/src/pages/HomePage/Box/index.ts new file mode 100644 index 00000000..87598c25 --- /dev/null +++ b/src/pages/HomePage/Box/index.ts @@ -0,0 +1,2 @@ +export { default as BoxCategory } from './BoxCategory/BoxCategory'; +export { default as BoxTodayTodo } from './BoxTodayTodo/BoxTodayTodo'; diff --git a/src/pages/HomePage/ButtonMoreFriends/ButtonMoreFriends.tsx b/src/pages/HomePage/Button/ButtonMoreFriends/ButtonMoreFriends.tsx similarity index 100% rename from src/pages/HomePage/ButtonMoreFriends/ButtonMoreFriends.tsx rename to src/pages/HomePage/Button/ButtonMoreFriends/ButtonMoreFriends.tsx diff --git a/src/pages/HomePage/ButtonUserProfile/ButtonUserProfile.tsx b/src/pages/HomePage/Button/ButtonUserProfile/ButtonUserProfile.tsx similarity index 100% rename from src/pages/HomePage/ButtonUserProfile/ButtonUserProfile.tsx rename to src/pages/HomePage/Button/ButtonUserProfile/ButtonUserProfile.tsx diff --git a/src/pages/HomePage/Button/index.ts b/src/pages/HomePage/Button/index.ts new file mode 100644 index 00000000..2914f0c8 --- /dev/null +++ b/src/pages/HomePage/Button/index.ts @@ -0,0 +1,2 @@ +export { default as ButtonMoreFriends } from './ButtonMoreFriends/ButtonMoreFriends'; +export { default as ButtonUserProfile } from './ButtonUserProfile/ButtonUserProfile'; diff --git a/src/pages/HomePage/HomePage.tsx b/src/pages/HomePage/HomePage.tsx index 8cf05491..e88a4167 100644 --- a/src/pages/HomePage/HomePage.tsx +++ b/src/pages/HomePage/HomePage.tsx @@ -7,6 +7,7 @@ import { useNavigate } from 'react-router-dom'; import { useQueryClient } from '@tanstack/react-query'; +import ButtonSVG from '@/shared/components/ButtonSVG'; import ModalWrapper, { ModalWrapperRef } from '@/shared/components/ModalWrapper'; import useClickOutside from '@/shared/hooks/useClickOutside'; @@ -29,13 +30,10 @@ import LargePlusIcon from '@/shared/assets/svgs/large_plus.svg?react'; import { ROUTES_CONFIG } from '@/router/routesConfig'; -import ButtonSVG from '../../shared/components/ButtonSVG'; -import BoxCategory from './BoxCategory/BoxCategory'; -import BoxTodayTodo from './BoxTodayTodo/BoxTodayTodo'; -import ButtonMoreFriends from './ButtonMoreFriends/ButtonMoreFriends'; -import ButtonUserProfile from './ButtonUserProfile/ButtonUserProfile'; +import { BoxCategory, BoxTodayTodo } from './Box'; +import { ButtonMoreFriends, ButtonUserProfile } from './Button'; import DatePicker from './DatePicker/DatePicker'; -import { ModalContentsCategory, ModalContentsFriends } from './ModalContents/index'; +import { ModalContentsCategory, ModalContentsFriends } from './ModalContents'; import StatusDefaultHome from './StatusDefaultHome/StatusDefaultHome'; dayjs.extend(utc); diff --git a/src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/ButtonAlert/ButtonAlert.tsx b/src/pages/HomePage/ModalContents/ModalContentsAlert/ButtonAlert/ButtonAlert.tsx similarity index 100% rename from src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/ButtonAlert/ButtonAlert.tsx rename to src/pages/HomePage/ModalContents/ModalContentsAlert/ButtonAlert/ButtonAlert.tsx diff --git a/src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/Complete.tsx b/src/pages/HomePage/ModalContents/ModalContentsAlert/Complete/Complete.tsx similarity index 82% rename from src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/Complete.tsx rename to src/pages/HomePage/ModalContents/ModalContentsAlert/Complete/Complete.tsx index b27ab6eb..d5e8db94 100644 --- a/src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/Complete.tsx +++ b/src/pages/HomePage/ModalContents/ModalContentsAlert/Complete/Complete.tsx @@ -1,5 +1,5 @@ -import ButtonAlert from './ButtonAlert/ButtonAlert'; -import { AlertModalProps } from './types/index'; +import ButtonAlert from '../ButtonAlert/ButtonAlert'; +import { AlertModalProps } from '../types/index'; const Complete = ({ handleClose, userEmail }: AlertModalProps) => (
diff --git a/src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/DeleteAccount.tsx b/src/pages/HomePage/ModalContents/ModalContentsAlert/DeleteAccount/DeleteAccount.tsx similarity index 95% rename from src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/DeleteAccount.tsx rename to src/pages/HomePage/ModalContents/ModalContentsAlert/DeleteAccount/DeleteAccount.tsx index a4631f6d..59b39acd 100644 --- a/src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/DeleteAccount.tsx +++ b/src/pages/HomePage/ModalContents/ModalContentsAlert/DeleteAccount/DeleteAccount.tsx @@ -2,8 +2,8 @@ import { FormEvent, useRef, useState } from 'react'; import IconWarning from '@/shared/assets/svgs/ic_delete_alert.svg?react'; -import ButtonAlert from './ButtonAlert/ButtonAlert'; -import { AlertModalProps } from './types/index'; +import ButtonAlert from '../ButtonAlert/ButtonAlert'; +import { AlertModalProps } from '../types/index'; const DeleteAccount = ({ handleClose, userEmail }: AlertModalProps) => { const inputRef = useRef(null); diff --git a/src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/Logout.tsx b/src/pages/HomePage/ModalContents/ModalContentsAlert/Logoout/Logout.tsx similarity index 87% rename from src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/Logout.tsx rename to src/pages/HomePage/ModalContents/ModalContentsAlert/Logoout/Logout.tsx index 6c9e99e5..46bf6cff 100644 --- a/src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/Logout.tsx +++ b/src/pages/HomePage/ModalContents/ModalContentsAlert/Logoout/Logout.tsx @@ -1,5 +1,5 @@ -import ButtonAlert from './ButtonAlert/ButtonAlert'; -import { AlertModalProps } from './types/index'; +import ButtonAlert from '../ButtonAlert/ButtonAlert'; +import { AlertModalProps } from '../types/index'; const Logout = ({ handleClose, userEmail }: AlertModalProps) => (
diff --git a/src/pages/HomePage/ModalContents/ModalContentsAlert/ModalContentsAlert.tsx b/src/pages/HomePage/ModalContents/ModalContentsAlert/ModalContentsAlert.tsx new file mode 100644 index 00000000..d0f6ce43 --- /dev/null +++ b/src/pages/HomePage/ModalContents/ModalContentsAlert/ModalContentsAlert.tsx @@ -0,0 +1,11 @@ +import Complete from '../../../ModalContentsAlert/Complete/Complete'; +import DeleteAccount from '../../../ModalContentsAlert/DeleteAccount/DeleteAccount'; +import Logout from '../../../ModalContentsAlert/Logoout/Logout'; + +const ModalContentsAlert = { + Logout: Logout, + DeleteAccount: DeleteAccount, + Complete: Complete, +}; + +export default ModalContentsAlert; diff --git a/src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/types/index.ts b/src/pages/HomePage/ModalContents/ModalContentsAlert/types/index.ts similarity index 100% rename from src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/types/index.ts rename to src/pages/HomePage/ModalContents/ModalContentsAlert/types/index.ts diff --git a/src/pages/HomePage/ModalContents/Category/ModalContentsCategory.tsx b/src/pages/HomePage/ModalContents/ModalContentsCategory/ModalContentsCategory.tsx similarity index 100% rename from src/pages/HomePage/ModalContents/Category/ModalContentsCategory.tsx rename to src/pages/HomePage/ModalContents/ModalContentsCategory/ModalContentsCategory.tsx diff --git a/src/pages/HomePage/ModalContents/Friends/components/FriendsRequest/components/ButtonRequestAction.tsx b/src/pages/HomePage/ModalContents/ModalContentsFriends/FriendRequest/ButtonRequestAction/ButtonRequestAction.tsx similarity index 100% rename from src/pages/HomePage/ModalContents/Friends/components/FriendsRequest/components/ButtonRequestAction.tsx rename to src/pages/HomePage/ModalContents/ModalContentsFriends/FriendRequest/ButtonRequestAction/ButtonRequestAction.tsx diff --git a/src/pages/HomePage/ModalContents/Friends/components/FriendsRequest/components/FriendsListRequested.tsx b/src/pages/HomePage/ModalContents/ModalContentsFriends/FriendRequest/FriendsListRequested/FriendsListRequested.tsx similarity index 100% rename from src/pages/HomePage/ModalContents/Friends/components/FriendsRequest/components/FriendsListRequested.tsx rename to src/pages/HomePage/ModalContents/ModalContentsFriends/FriendRequest/FriendsListRequested/FriendsListRequested.tsx diff --git a/src/pages/HomePage/ModalContents/Friends/components/FriendsRequest/FriendsRequest.tsx b/src/pages/HomePage/ModalContents/ModalContentsFriends/FriendRequest/FriendsRequest.tsx similarity index 61% rename from src/pages/HomePage/ModalContents/Friends/components/FriendsRequest/FriendsRequest.tsx rename to src/pages/HomePage/ModalContents/ModalContentsFriends/FriendRequest/FriendsRequest.tsx index cfe6f722..229e6486 100644 --- a/src/pages/HomePage/ModalContents/Friends/components/FriendsRequest/FriendsRequest.tsx +++ b/src/pages/HomePage/ModalContents/ModalContentsFriends/FriendRequest/FriendsRequest.tsx @@ -1,8 +1,8 @@ import { userFriendData } from '@/shared/mocks/userFriendData'; -import ButtonRequestAction from './components/ButtonRequestAction'; -import FriendsListRequested from './components/FriendsListRequested'; -import InputSendRequest from './components/InputSendRequest'; +import ButtonRequestAction from '../../ModalContents/Friends/components/FriendsRequest/components/ButtonRequestAction'; +import FriendsListRequested from '../../ModalContents/Friends/components/FriendsRequest/components/FriendsListRequested'; +import InputSendRequest from '../../ModalContents/Friends/components/FriendsRequest/components/InputSendRequest'; const FriendsRequest = () => { return ( @@ -11,7 +11,7 @@ const FriendsRequest = () => {
-

받은 요청

+

받은 요청

수락 @@ -19,7 +19,7 @@ const FriendsRequest = () => {
-

보낸 요청

+

보낸 요청

요청 취소 diff --git a/src/pages/HomePage/ModalContents/Friends/components/FriendsRequest/components/InputSendRequest.tsx b/src/pages/HomePage/ModalContents/ModalContentsFriends/FriendRequest/InputSendRequest/InputSendRequest.tsx similarity index 100% rename from src/pages/HomePage/ModalContents/Friends/components/FriendsRequest/components/InputSendRequest.tsx rename to src/pages/HomePage/ModalContents/ModalContentsFriends/FriendRequest/InputSendRequest/InputSendRequest.tsx diff --git a/src/pages/HomePage/ModalContents/Friends/components/FriendsList/FriendsList.tsx b/src/pages/HomePage/ModalContents/ModalContentsFriends/FriendsList/FriendsList.tsx similarity index 100% rename from src/pages/HomePage/ModalContents/Friends/components/FriendsList/FriendsList.tsx rename to src/pages/HomePage/ModalContents/ModalContentsFriends/FriendsList/FriendsList.tsx diff --git a/src/pages/HomePage/ModalContents/Friends/components/FriendsList/components/FriendInfo.tsx b/src/pages/HomePage/ModalContents/ModalContentsFriends/FriendsList/components/FriendInfo.tsx similarity index 100% rename from src/pages/HomePage/ModalContents/Friends/components/FriendsList/components/FriendInfo.tsx rename to src/pages/HomePage/ModalContents/ModalContentsFriends/FriendsList/components/FriendInfo.tsx diff --git a/src/pages/HomePage/ModalContents/Friends/ModalContentsFriends.tsx b/src/pages/HomePage/ModalContents/ModalContentsFriends/ModalContentsFriends.tsx similarity index 73% rename from src/pages/HomePage/ModalContents/Friends/ModalContentsFriends.tsx rename to src/pages/HomePage/ModalContents/ModalContentsFriends/ModalContentsFriends.tsx index 647d9059..5ee744fb 100644 --- a/src/pages/HomePage/ModalContents/Friends/ModalContentsFriends.tsx +++ b/src/pages/HomePage/ModalContents/ModalContentsFriends/ModalContentsFriends.tsx @@ -1,7 +1,7 @@ import { forwardRef, useState } from 'react'; -import FriendsList from './components/FriendsList/FriendsList'; -import FriendsRequest from './components/FriendsRequest/FriendsRequest'; +import FriendsRequest from './FriendRequest/FriendsRequest'; +import FriendsList from './FriendsList/FriendsList'; const ModalContentsFriends = forwardRef((_, ref) => { const [activeTab, setActiveTab] = useState('친구목록'); @@ -15,17 +15,17 @@ const ModalContentsFriends = forwardRef((_, ref) => { ref={ref} className="h-[800px] w-[1300px] rounded-[14px] bg-gray-bg-03 p-[4rem] shadow-[0_3px_30px_0px_rgba(0,0,0,0.4)]" > -

친구

+

친구