fix: unnecessary re-renders in PageComponent and update edgeTypes (#3917)
fix: Update edgeTypes in PageComponent to prevent unecessary re-renders and remove console alert
This commit is contained in:
parent
fbb097dc4c
commit
106a34d2ff
1 changed files with 5 additions and 1 deletions
|
|
@ -64,6 +64,10 @@ const nodeTypes = {
|
|||
noteNode: NoteNode,
|
||||
};
|
||||
|
||||
const edgeTypes = {
|
||||
default: DefaultEdge,
|
||||
};
|
||||
|
||||
export default function Page({ view }: { view?: boolean }): JSX.Element {
|
||||
const uploadFlow = useUploadFlow();
|
||||
const autoSaveFlow = useAutoSaveFlow();
|
||||
|
|
@ -464,7 +468,7 @@ export default function Page({ view }: { view?: boolean }): JSX.Element {
|
|||
onSelectionEnd={onSelectionEnd}
|
||||
onSelectionStart={onSelectionStart}
|
||||
connectionRadius={25}
|
||||
edgeTypes={{ default: DefaultEdge }}
|
||||
edgeTypes={edgeTypes}
|
||||
connectionLineComponent={ConnectionLineComponent}
|
||||
onDragOver={onDragOver}
|
||||
onNodeDragStop={onNodeDragStop}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue