From 1db2dc16d6c8041fca4bb4210ef506ded0e65d57 Mon Sep 17 00:00:00 2001 From: dasosann Date: Wed, 21 Jan 2026 16:34:54 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=BD=94=EB=93=9C=EB=A6=AC=EB=B7=B0=20?= =?UTF-8?q?=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/feature/create-album/components/CreateInputList.tsx | 8 ++------ src/feature/photo-detail/components/FooterPhotoDetail.tsx | 8 -------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/feature/create-album/components/CreateInputList.tsx b/src/feature/create-album/components/CreateInputList.tsx index ce50816b..32a26dc7 100644 --- a/src/feature/create-album/components/CreateInputList.tsx +++ b/src/feature/create-album/components/CreateInputList.tsx @@ -2,6 +2,7 @@ import DateXInput from '@/global/components/DateXInput'; import XInput from '@/global/components/XInput'; +import { format } from 'date-fns'; import { useState } from 'react'; interface CreateInputListProps { @@ -75,12 +76,7 @@ export default function CreateInputList({ onErrorChange?.(error !== '' || eventNameError !== ''); }; - // 로컬 시간대 기준으로 오늘 날짜를 YYYY-MM-DD로 계산 - const todayDate = new Date(); - const yyyy = todayDate.getFullYear(); - const mm = String(todayDate.getMonth() + 1).padStart(2, '0'); // 0-11이므로 +1 - const dd = String(todayDate.getDate()).padStart(2, '0'); - const today = `${yyyy}-${mm}-${dd}`; + const today = format(new Date(), 'yyyy-MM-dd'); return (
diff --git a/src/feature/photo-detail/components/FooterPhotoDetail.tsx b/src/feature/photo-detail/components/FooterPhotoDetail.tsx index 2317c833..437743f7 100644 --- a/src/feature/photo-detail/components/FooterPhotoDetail.tsx +++ b/src/feature/photo-detail/components/FooterPhotoDetail.tsx @@ -44,13 +44,6 @@ export default function FooterPhotoDetail({ photoId, }); - console.log( - '🗑️ FooterPhotoDetail - canDelete:', - photoDetail?.canDelete, - 'photoId:', - photoId, - ); - const { mutateAsync: mutateAsyncLike, isPending: isLiking } = usePhotoLikedMutation(); const { mutateAsync: mutateAsyncUnlike, isPending: isUnliking } = @@ -62,7 +55,6 @@ export default function FooterPhotoDetail({ try { await mutateAsyncDelete({ albumId, photoId }); queryClient.invalidateQueries({ queryKey: [EP.album.photos(albumId)] }); - setIsPhotoInfoOpen(false); } catch (e) { console.error(e); Toast.alert('사진 삭제에 실패했습니다.');