Skip to content

Commit

Permalink
fix: page 컴포넌트 필요없는 함수 전달 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
pipisebastian committed Nov 26, 2024
1 parent 1b54bf5 commit e08bc44
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions client/src/features/page/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ interface PageProps extends PageType {
handlePageSelect: ({ pageId, isSidebar }: { pageId: string; isSidebar?: boolean }) => void;
handlePageClose: (pageId: string) => void;
handleTitleChange: (pageId: string, newTitle: string) => void;
updatePageData: (pageId: string, newData: serializedEditorDataProps) => void;
serializedEditorData: serializedEditorDataProps | null;
}

Expand All @@ -26,7 +25,6 @@ export const Page = ({
handlePageSelect,
handlePageClose,
handleTitleChange,
updatePageData,
serializedEditorData,
}: PageProps) => {
const { position, size, pageDrag, pageResize, pageMinimize, pageMaximize } = usePage({ x, y });
Expand All @@ -46,7 +44,7 @@ export const Page = ({
// serializedEditorData prop이 변경되면 local state도 업데이트
useEffect(() => {
setSerializedEditorDatas(serializedEditorData);
}, [serializedEditorData, updatePageData]);
}, [serializedEditorData]);

if (!serializedEditorDatas) {
return null;
Expand Down Expand Up @@ -76,7 +74,6 @@ export const Page = ({
onTitleChange={onTitleChange}
pageId={id}
serializedEditorData={serializedEditorDatas}
updatePageData={updatePageData}
/>
{DIRECTIONS.map((direction) => (
<motion.div
Expand Down

0 comments on commit e08bc44

Please sign in to comment.