From 2fa977d22d39fe20bc5e073e24beb27b49bc34b9 Mon Sep 17 00:00:00 2001 From: Largopie Date: Thu, 5 Sep 2024 14:22:35 +0900 Subject: [PATCH] =?UTF-8?q?refactor(useTimeRangeDropdown):=20=EC=9C=A0?= =?UTF-8?q?=ED=8B=B8=ED=95=A8=EC=88=98=20=EB=B0=98=ED=99=98=20=EB=AC=B8?= =?UTF-8?q?=EC=9E=90=EC=97=B4=20+=20=EB=8C=80=EC=8B=A0=20=EB=B0=B1?= =?UTF-8?q?=ED=8B=B1(``)=EC=9C=BC=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../useTimeRangeDropdown/useTimeRangeDropdown.utils.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/frontend/src/hooks/useTimeRangeDropdown/useTimeRangeDropdown.utils.ts b/frontend/src/hooks/useTimeRangeDropdown/useTimeRangeDropdown.utils.ts index 6f923aa4..0e58c2e5 100644 --- a/frontend/src/hooks/useTimeRangeDropdown/useTimeRangeDropdown.utils.ts +++ b/frontend/src/hooks/useTimeRangeDropdown/useTimeRangeDropdown.utils.ts @@ -48,11 +48,9 @@ export function isTimeSelectable(startTime: string, endTime: string) { return true; } -// 현재 시간에서 1시간 더한 시간을 반화해주는 함수(@낙타) +// 현재 시간에서 1시간 더한 시간을 반환해주는 함수(@낙타) export function addHoursToCurrentTime(currentTime: string, hours: number) { const [currentHours, currentMinutes] = currentTime.split(':').map(Number); - return ( - String(currentHours + hours).padStart(2, '0') + ':' + String(currentMinutes).padStart(2, '0') - ); + return `${String(currentHours + hours).padStart(2, '0')}:${String(currentMinutes).padStart(2, '0')}`; }