Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] - 데모데이 피드백 반영(지니) #418

Merged
merged 8 commits into from
Sep 25, 2024
2 changes: 1 addition & 1 deletion frontend/src/hooks/pages/useTravelPlanDays.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export const useTravelPlanDays = (days: TravelTransformPlaces[]) => {
const travelPlanPlace = previousTravelPlanDays[dayIndex]?.places[placeIndex];

if (travelPlanPlace?.todos) {
travelPlanPlace.todos.splice(Number(todoId), 1);
travelPlanPlace.todos = travelPlanPlace.todos.filter((todo) => todo.id !== todoId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그 전 코드로는 왜 제대로 삭제 안됐는지 궁금하네요...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

splice의 경우 todos index에서 1개를 지우는건데 todoId가 숫자값이 아닌 문자열이라서 제거가 안되더라구여 !

}
});
},
Expand Down