Skip to content

Commit

Permalink
fix: toSorted 배포상 이슈로 slice메소드와 sort메소드 사용으로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
ljh0608 committed Jul 29, 2024
1 parent 6a94a11 commit 6e833aa
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ function PriorityDropdown() {
return Number(month + formatDay + hour + minute);
};

const sortedSlots = Object.entries(selectedSlots).toSorted(
(a, b) => parseDateTime(a[1].date, a[1].startSlot) - parseDateTime(b[1].date, b[1].startSlot),
);
const sortedSlots = Object.entries(selectedSlots)
.slice()
.sort(
(a, b) => parseDateTime(a[1].date, a[1].startSlot) - parseDateTime(b[1].date, b[1].startSlot),
);

const formatDate = (date: string) => {
const [month, day, dayOfWeek] = date.split('/');
Expand Down

0 comments on commit 6e833aa

Please sign in to comment.