Skip to content

Commit

Permalink
fix: resolve issue
Browse files Browse the repository at this point in the history
  • Loading branch information
cjeongmin committed Oct 1, 2024
1 parent a3359eb commit c5dbafa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/features/trip/trip.slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,13 @@ export const useTripStore = create<TripState & TripAction>((set, get) => ({

const newActivities = [...activities];

items.forEach((activity, index) => {
items.forEach((activity) => {
if (
newActivities[day - 1].some((act) => act.dayTime === activity.dayTime)
)
return;

newActivities[day - 1].push({ ...activity, dayNumber: index + 1 });
newActivities[day - 1].push({ ...activity, dayNumber: day });
newActivities[day - 1].sort(
(a, b) => TIME_ORDER[a.dayTime] - TIME_ORDER[b.dayTime],
);
Expand Down

0 comments on commit c5dbafa

Please sign in to comment.