Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into dev_gathering
  • Loading branch information
ssssksss committed Sep 5, 2024
2 parents ecdab41 + ce08160 commit 673f518
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions src/containers/diary/edit/DiaryEditorContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { useRouter } from "next/navigation";
import { useEffect, useState } from "react";
import sanitizeHtml from "sanitize-html";
import { parse } from "node-html-parser";
import { useForm } from "react-hook-form";
import { FormProvider, useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";

interface Props {
Expand Down Expand Up @@ -137,21 +137,23 @@ const DiaryEditorContainer = ({ diaryData }: Props) => {
}, []);

return (
<DiaryEditor
text="수정"
diaryEditorStore={diaryEditorStore}
dateRangeModal={dateRangeModal}
addressModal={addressModal}
loading={loading}
showDateRangeModal={() => setDateRangeModal(true)}
closeDateRangeModal={() => setDateRangeModal(false)}
showAddressModal={() => setAddressModal(true)}
closeAddressModal={() => setAddressModal(false)}
setCurrentDay={(day: number) =>
diaryEditorStore.setDiaryEditor({ currentDay: day })
}
onSubmit={onSubmit}
/>
<FormProvider {...methods}>
<DiaryEditor
text="수정"
diaryEditorStore={diaryEditorStore}
dateRangeModal={dateRangeModal}
addressModal={addressModal}
loading={loading}
showDateRangeModal={() => setDateRangeModal(true)}
closeDateRangeModal={() => setDateRangeModal(false)}
showAddressModal={() => setAddressModal(true)}
closeAddressModal={() => setAddressModal(false)}
setCurrentDay={(day: number) =>
diaryEditorStore.setDiaryEditor({ currentDay: day })
}
onSubmit={onSubmit}
/>
</FormProvider>
);
};

Expand Down

0 comments on commit 673f518

Please sign in to comment.