Skip to content

Commit

Permalink
redundant usememo
Browse files Browse the repository at this point in the history
  • Loading branch information
neysanfoo committed Oct 3, 2024
1 parent 99508d3 commit 12b9d18
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,6 @@ export default function ExcalidrawComponent({
appState = {},
} = useMemo(() => JSON.parse(data), [data]);

const [currentWidth, currentHeight] = useMemo(() => {
return [width, height];
}, [width, height]);

const closeModal = useCallback(() => {
setModalOpen(false);
if (elements.length === 0) {
Expand Down Expand Up @@ -226,8 +222,8 @@ export default function ExcalidrawComponent({
elements={elements}
files={files}
appState={appState}
width={currentWidth}
height={currentHeight}
width={width}
height={height}
/>
{isSelected && (
<div
Expand Down

0 comments on commit 12b9d18

Please sign in to comment.