From 47b767c6ce5c86d4481b1a84508a01b7612aef24 Mon Sep 17 00:00:00 2001 From: skiende74 Date: Thu, 24 Oct 2024 14:05:37 +0900 Subject: [PATCH 1/5] =?UTF-8?q?feat:=20=EB=94=94=ED=8F=B4=ED=8A=B8?= =?UTF-8?q?=EB=B0=A9=EC=9D=B4=EB=A6=84=201=EB=B2=88=EC=A7=B8=EB=B0=A9?= =?UTF-8?q?=EB=B6=80=ED=84=B0=20=EC=8B=9C=EC=9E=91=ED=95=98=EA=B2=8C?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../NewChecklist/NewRoomInfoForm/useDefaultRoomName.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/NewChecklist/NewRoomInfoForm/useDefaultRoomName.ts b/frontend/src/components/NewChecklist/NewRoomInfoForm/useDefaultRoomName.ts index 3517d2d8b..c139036d2 100644 --- a/frontend/src/components/NewChecklist/NewRoomInfoForm/useDefaultRoomName.ts +++ b/frontend/src/components/NewChecklist/NewRoomInfoForm/useDefaultRoomName.ts @@ -13,11 +13,13 @@ const useDefaultRoomName = () => { if (!checklistList) return; if (roomName.rawValue !== initialRoomInfo.roomName.rawValue) return; const count = checklistList.filter( - checklist => new Date(checklist.createdAt).getUTCDay() === new Date().getUTCDay(), + checklist => + new Date(checklist.createdAt).getUTCDay() === new Date().getUTCDay() && + checklist.roomName !== '예시용 체크리스트', ).length; const date = new Date(); - roomName.set(`${date.getMonth() + 1}월 ${date.getDate()}일 ${count}번째 방`); + roomName.set(`${date.getMonth() + 1}월 ${date.getDate()}일 ${count + 1}번째 방`); }, [checklistList]); }; From 2c9477749e2d4a2b4476617685482bf87ec9ce37 Mon Sep 17 00:00:00 2001 From: skiende74 Date: Thu, 24 Oct 2024 14:14:44 +0900 Subject: [PATCH 2/5] =?UTF-8?q?feat:=20roomInfoNonvalidated=EB=8F=84=20?= =?UTF-8?q?=EB=A1=9C=EC=BB=AC=EC=8A=A4=ED=86=A0=EB=A6=AC=EC=A7=80=20?= =?UTF-8?q?=EA=B4=80=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/store/roomInfoNonValidatedStore.ts | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/frontend/src/store/roomInfoNonValidatedStore.ts b/frontend/src/store/roomInfoNonValidatedStore.ts index 804f1de3a..7e9ded9f2 100644 --- a/frontend/src/store/roomInfoNonValidatedStore.ts +++ b/frontend/src/store/roomInfoNonValidatedStore.ts @@ -1,4 +1,5 @@ import { createStore } from 'zustand'; +import { persist } from 'zustand/middleware'; import { DEFAULT_POSITION } from '@/constants/map'; import { Position } from '@/types/address'; @@ -21,12 +22,23 @@ const defaultStates = { position: DEFAULT_POSITION, }; -const roomInfoNonValidatedStore = createStore()(set => ({ - ...defaultStates, - actions: { - set: (name, value) => set({ [name]: value }), - resetAll: () => set(defaultStates), - }, -})); +const roomInfoNonValidatedStore = createStore()( + persist( + set => ({ + ...defaultStates, + actions: { + set: (name, value) => set({ [name]: value }), + resetAll: () => set(defaultStates), + }, + }), + { + name: 'roomInfo-nonvalidated', + partialize: store => { + const { actions: _, ...state } = store; + return { ...state }; + }, + }, + ), +); export default roomInfoNonValidatedStore; From 2094e655cde5c3a5d3ef2e38d287356663c8d3d5 Mon Sep 17 00:00:00 2001 From: skiende74 Date: Thu, 24 Oct 2024 14:28:21 +0900 Subject: [PATCH 3/5] =?UTF-8?q?fix:=20=EB=AA=A8=EB=8B=AC=20=ED=8F=AC?= =?UTF-8?q?=EC=BB=A4=EC=8A=A4=ED=8A=B8=EB=9E=A9=EC=9C=BC=EB=A1=9C=EC=9D=B8?= =?UTF-8?q?=ED=95=B4=20=20=EC=9D=B8=ED=92=8B=20=ED=8F=AC=EC=BB=A4=EC=8A=A4?= =?UTF-8?q?=EC=95=88=EB=90=98=EB=8A=94=20=EB=B2=84=EA=B7=B8=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/_common/Modal/Modal.tsx | 37 ++++++++++--------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/frontend/src/components/_common/Modal/Modal.tsx b/frontend/src/components/_common/Modal/Modal.tsx index 521ca0775..683bb3f29 100644 --- a/frontend/src/components/_common/Modal/Modal.tsx +++ b/frontend/src/components/_common/Modal/Modal.tsx @@ -38,23 +38,26 @@ const Modal = ({ }: ModalProps) => { if (!modalRoot) return null; - return createPortal( - - - {hasDim && {}} hasDim={hasDim} />} - - - {children} - {hasCloseButton && ( - - - - )} - - - - , - modalRoot, + return ( + isOpen && + createPortal( + + + {hasDim && {}} hasDim={hasDim} />} + + + {children} + {hasCloseButton && ( + + + + )} + + + + , + modalRoot, + ) ); }; From 9862d7f32dff65ef4a3c62caa0c01f3562be5e59 Mon Sep 17 00:00:00 2001 From: skiende74 Date: Thu, 24 Oct 2024 14:47:54 +0900 Subject: [PATCH 4/5] =?UTF-8?q?feat:=20=EC=A2=8B=EC=95=84=EC=9A=94?= =?UTF-8?q?=EB=B2=84=ED=8A=BC=20=ED=81=B4=EB=A6=AD=EC=8B=9C=20=ED=85=8C?= =?UTF-8?q?=EB=91=90=EB=A6=AC=20=EC=83=9D=EA=B8=B0=EB=8A=94=20=ED=98=84?= =?UTF-8?q?=EC=83=81=20=ED=95=B4=EA=B2=B0=20(=ED=83=AD=EC=9D=B8=EB=8D=B1?= =?UTF-8?q?=EC=8A=A4=EC=A0=9C=EA=B1=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/_common/Like/LikeButton.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/src/components/_common/Like/LikeButton.tsx b/frontend/src/components/_common/Like/LikeButton.tsx index 02045622a..c91c9c814 100644 --- a/frontend/src/components/_common/Like/LikeButton.tsx +++ b/frontend/src/components/_common/Like/LikeButton.tsx @@ -14,7 +14,7 @@ const LikeButton = ({ isLiked = false, checklistId }: Props) => { const [localIsLiked, setLocalIsLiked] = useState(isLiked); const { mutate: toggleLike, variables, isPending } = useToggleLikeQuery(); - const debouncedIsLiked = useDebounce({ value: localIsLiked, delay: 500 }); + const debouncedIsLiked = useDebounce({ value: localIsLiked, delay: 200 }); useEffect(() => { if (debouncedIsLiked !== isLiked) { @@ -41,7 +41,6 @@ const LikeButton = ({ isLiked = false, checklistId }: Props) => { onClick={handleClickLike} fill={fill ? theme.palette.red500 : 'NONE'} stroke={fill ? theme.palette.red500 : theme.palette.grey500} - tabIndex={1} aria-label="좋아요 버튼" /> ); From 51013cb7c7daa0548e680dbd4def29da51435eb9 Mon Sep 17 00:00:00 2001 From: skiende74 Date: Thu, 24 Oct 2024 15:09:48 +0900 Subject: [PATCH 5/5] =?UTF-8?q?feat:=20ga=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/routers/GoogleAnalytics.tsx | 9 --------- frontend/src/routers/router.tsx | 2 -- 2 files changed, 11 deletions(-) delete mode 100644 frontend/src/routers/GoogleAnalytics.tsx diff --git a/frontend/src/routers/GoogleAnalytics.tsx b/frontend/src/routers/GoogleAnalytics.tsx deleted file mode 100644 index 0f12178dc..000000000 --- a/frontend/src/routers/GoogleAnalytics.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import useGaTracker from '@/hooks/useGaTracker'; - -const GoogleAnalytics = () => { - useGaTracker(); - - return null; -}; - -export default GoogleAnalytics; diff --git a/frontend/src/routers/router.tsx b/frontend/src/routers/router.tsx index 42d51e2d9..e69ba7b22 100644 --- a/frontend/src/routers/router.tsx +++ b/frontend/src/routers/router.tsx @@ -5,7 +5,6 @@ import FooterLayout from '@/components/_common/layout/FooterLayout'; import { ROUTE_PATH } from '@/constants/routePath'; import SignInPage from '@/pages/SignInPage'; import SignUpPage from '@/pages/SignUpPage'; -import GoogleAnalytics from '@/routers/GoogleAnalytics'; const MainPage = React.lazy(() => import('@/pages/MainPage')); const ChecklistListPage = React.lazy(() => import('@/pages/ChecklistListPage')); @@ -24,7 +23,6 @@ const router = createBrowserRouter([ { element: ( - ),