Skip to content

Commit

Permalink
[FE] 하루 전체 일정에서 쿼리 매개변수 형식 변경 (#935)
Browse files Browse the repository at this point in the history
  • Loading branch information
hafnium1923 authored Feb 18, 2024
1 parent 72d506c commit 2a1cb6c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions frontend/src/hooks/queries/useFetchDailySchedules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ export const useFetchDailySchedules = (
month: number,
day: number,
) => {
const stringYear = String(year).padStart(4, '0');
const stringMonth = String(month + 1).padStart(2, '0');
const stringDay = String(day).padStart(2, '0');

const { data } = useQuery(
['dailySchedules', year, month, day],
() =>
fetchSchedules(
teamPlaceId,
`${year}${month + 1}${day}`,
`${year}${month + 1}${day}`,
`${stringYear}${stringMonth}${stringDay}`,
`${stringYear}${stringMonth}${stringDay}`,
),
{
enabled: teamPlaceId > 0,
Expand Down

0 comments on commit 2a1cb6c

Please sign in to comment.