Skip to content

Commit

Permalink
chore: 생성플랜 id값 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
faddishcorn committed Nov 13, 2024
1 parent 363359d commit cee0889
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pages/Main/MainPageModify.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,14 @@ export default function PlanModifyPage() {
},
},
{
onSuccess: () => {
onSuccess: (response) => {
const newPlanId = response.data.id;
alert("플랜이 추가되었습니다.");
setModifiedPlans([
...modifiedPlans,
{
...newPlanData,
id: Date.now().toString(), // 가상의 ID 생성
id: newPlanId, // 응답 데이터의 id 사용
start: new Date(startDate),
end: new Date(endDate),
complete: isCompleted,
Expand Down

0 comments on commit cee0889

Please sign in to comment.