From 514f6987d99d58fbf56ea795e96199301ef1cd60 Mon Sep 17 00:00:00 2001 From: dasosann Date: Wed, 21 Jan 2026 14:08:39 +0900 Subject: [PATCH 1/5] =?UTF-8?q?fix:=20=EC=95=A8=EB=B2=94=EC=83=9D=EC=84=B1?= =?UTF-8?q?=20=EB=82=A0=EC=A7=9C=20=EC=98=A4=EB=8A=98=EA=B9=8C=EC=A7=80?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../create-album/components/CreateInputList.tsx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/feature/create-album/components/CreateInputList.tsx b/src/feature/create-album/components/CreateInputList.tsx index baab1128..ce50816b 100644 --- a/src/feature/create-album/components/CreateInputList.tsx +++ b/src/feature/create-album/components/CreateInputList.tsx @@ -75,13 +75,12 @@ export default function CreateInputList({ onErrorChange?.(error !== '' || eventNameError !== ''); }; - // 로컬 시간대 기준으로 어제 날짜를 YYYY-MM-DD로 계산 - const yesterdayDate = new Date(); - yesterdayDate.setDate(yesterdayDate.getDate() - 1); - const yyyy = yesterdayDate.getFullYear(); - const mm = String(yesterdayDate.getMonth() + 1).padStart(2, '0'); // 0-11이므로 +1 - const dd = String(yesterdayDate.getDate()).padStart(2, '0'); - const yesterday = `${yyyy}-${mm}-${dd}`; + // 로컬 시간대 기준으로 오늘 날짜를 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}`; return (
@@ -98,7 +97,7 @@ export default function CreateInputList({ value={eventDate} onChange={onEventDateChange} placeholder='YYYY-MM-DD' - max={yesterday} + max={today} /> Date: Wed, 21 Jan 2026 14:12:11 +0900 Subject: [PATCH 2/5] =?UTF-8?q?fix:=20=EB=AA=A8=EB=8B=AC=EC=97=90=20border?= =?UTF-8?q?=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/global/components/modal/ConfirmModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/global/components/modal/ConfirmModal.tsx b/src/global/components/modal/ConfirmModal.tsx index 5a509259..68ed3983 100644 --- a/src/global/components/modal/ConfirmModal.tsx +++ b/src/global/components/modal/ConfirmModal.tsx @@ -79,7 +79,7 @@ export default function ConfirmModal({ {trigger} - + {title} From 1433bc0a0686822a7a45519cfbc46db004c7c785 Mon Sep 17 00:00:00 2001 From: dasosann Date: Wed, 21 Jan 2026 14:20:13 +0900 Subject: [PATCH 3/5] =?UTF-8?q?fix:=20=EB=B0=94=ED=85=80info=20=EC=88=9C?= =?UTF-8?q?=EC=84=9C=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/FooterPhotoDetail.tsx | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/feature/photo-detail/components/FooterPhotoDetail.tsx b/src/feature/photo-detail/components/FooterPhotoDetail.tsx index b838e6ba..a097f1db 100644 --- a/src/feature/photo-detail/components/FooterPhotoDetail.tsx +++ b/src/feature/photo-detail/components/FooterPhotoDetail.tsx @@ -105,6 +105,19 @@ export default function FooterPhotoDetail({ return (
+ -
+ + {photoDetail?.canDelete && ( + + + + } + /> + )}
); } diff --git a/src/feature/photo-detail/components/SectionPhotoData.tsx b/src/feature/photo-detail/components/SectionPhotoData.tsx index c3b598ad..1a612e63 100644 --- a/src/feature/photo-detail/components/SectionPhotoData.tsx +++ b/src/feature/photo-detail/components/SectionPhotoData.tsx @@ -1,13 +1,7 @@ -import { EP } from '@/global/api/ep'; -import ConfirmModal from '@/global/components/modal/ConfirmModal'; -import { useQueryClient } from '@tanstack/react-query'; -import { useDeleteAlbumPhotoMutation } from '../hooks/useDeleteAlbumPhotoMutation'; -import { usePhotoDetailQuery } from '../hooks/usePhotoDetailQuery'; - interface SectionPhotoDataProps { - albumId: string; - photoId: number; - onAfterDelete?: () => void; + name?: string; + captureTime?: string; + createdAt?: string; } // 촬영 시각: 사진 EXIF 시간 그대로 표시 (타임존 변환 안 함) @@ -48,68 +42,30 @@ const formatKoreanDateTime = (isoString?: string): string => { }; export default function SectionPhotoData({ - albumId, - photoId, - onAfterDelete, + name, + captureTime, + createdAt, }: SectionPhotoDataProps) { - const queryClient = useQueryClient(); - const { data, isPending, isError } = usePhotoDetailQuery({ - albumId, - photoId, - }); - const { mutateAsync } = useDeleteAlbumPhotoMutation(); - - if (isPending) return null; - if (isError) return null; - - const handleDeleteClick = async () => { - try { - await mutateAsync({ albumId, photoId }); - queryClient.invalidateQueries({ queryKey: [EP.album.photos(albumId)] }); - } finally { - onAfterDelete?.(); - } - }; - return ( -
-
+
+
업로드한 사람
-
{data?.name}
+
{name}
촬영 시각
- {formatCaptureTime(data?.captureTime)} + {formatCaptureTime(captureTime)}
업로드 시각
- {formatKoreanDateTime(data?.createdAt)} + {formatKoreanDateTime(createdAt)}
- - {data?.canDelete && ( - - 사진 삭제하기 - - } - /> - )}
); } diff --git a/src/global/api/ep.ts b/src/global/api/ep.ts index 90995760..b695f366 100644 --- a/src/global/api/ep.ts +++ b/src/global/api/ep.ts @@ -104,7 +104,7 @@ export interface PreviewPhotoInfoSchema { "photoId": number; "imageUrl": string; export interface AuthExchangeResponseSchema { "accessToken": string; "refreshToken": string; "isOnboarded": boolean; "userId": number; "name": string; "email": string; } export interface CommonResponseAuthExchangeResponseSchema { "isSuccess"?: boolean; "code"?: number; "message"?: string; "result"?: AuthExchangeResponseSchema; } export interface CommonResponsePhotoPageResponseSchema { "isSuccess"?: boolean; "code"?: number; "message"?: string; "result"?: PhotoPageResponseSchema; } -export interface PhotoListResponseSchema { "name"?: string; "photoId": number; "profileImage": string; "imageUrl"?: string; "thumbnailUrl": string; "likeCnt": number; "isLiked": boolean; "isDownloaded": boolean; "isRecentlyDownloaded": boolean; } +export interface PhotoListResponseSchema { "name"?: string; "photoId": number; "profileImage": string; "imageUrl"?: string; "thumbnailUrl": string; "likeCnt": number; "isLiked": boolean; "isDownloaded": boolean; "isRecentlyDownloaded": boolean; "canDelete"?: boolean; } export interface PhotoPageResponseSchema { "responses": PhotoListResponseSchema[]; "listSize": number; "isFirst": boolean; "isLast": boolean; "hasNext": boolean; } export interface CommonResponsePhotoDetailResponseSchema { "isSuccess"?: boolean; "code"?: number; "message"?: string; "result"?: PhotoDetailResponseSchema; } export interface PhotoDetailResponseSchema { "name": string; "profileImage": string; "photoId": number; "imageUrl": string; "thumbnailUrl": string; "likesCnt": number; "isLiked": boolean; "isDownloaded": boolean; "isRecentlyDownloaded": boolean; "canDelete"?: boolean; "captureTime"?: string; "createdAt"?: string; } From 5cdfb5fe8bba4acb31d9ae229e96264463ce8b7e Mon Sep 17 00:00:00 2001 From: dasosann Date: Wed, 21 Jan 2026 15:18:22 +0900 Subject: [PATCH 5/5] =?UTF-8?q?fix:=20=EB=82=A0=EC=A7=9C=20=ED=94=BC?= =?UTF-8?q?=EC=BB=A4=20=EC=97=AC=EB=B0=B1=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ui/scrollable-date-picker.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ui/scrollable-date-picker.tsx b/src/components/ui/scrollable-date-picker.tsx index d0522677..a408a369 100644 --- a/src/components/ui/scrollable-date-picker.tsx +++ b/src/components/ui/scrollable-date-picker.tsx @@ -238,7 +238,7 @@ export function ScrollableDatePicker({ return (
{/* Selection Indicator */} -
+
{/* Columns Container */}