Skip to content

Commit

Permalink
feat: 추가시 로직 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
urimeee committed Feb 19, 2025
1 parent 2cad991 commit 461245a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/hooks/useSchedule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ const useSchedules = () => {
throw new Error(response.statusText);
}

setScheduleList((prev) => {
return JSON.stringify(prev) === JSON.stringify(response.data)
? [...response.data]
: response.data;
});
setScheduleList((prev) =>
JSON.stringify(prev) === JSON.stringify(response.data)
? prev
: [...response.data],
);
} catch (e) {
console.error(e);
}
Expand Down

0 comments on commit 461245a

Please sign in to comment.