From 4fa32d5073c83e9f1acd55fd573c52145df6f0a2 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Thu, 25 Feb 2021 19:25:22 -0800 Subject: [PATCH] chores: fix compilation --- .../maps-page/action-dispatcher/duplicate-dialog/index.tsx | 5 +---- .../maps-page/action-dispatcher/rename-dialog/index.tsx | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/webapp/src/components/maps-page/action-dispatcher/duplicate-dialog/index.tsx b/packages/webapp/src/components/maps-page/action-dispatcher/duplicate-dialog/index.tsx index 88496bff..4c44b677 100644 --- a/packages/webapp/src/components/maps-page/action-dispatcher/duplicate-dialog/index.tsx +++ b/packages/webapp/src/components/maps-page/action-dispatcher/duplicate-dialog/index.tsx @@ -58,11 +58,8 @@ const DuplicateDialog = ({ mapId, onClose }: SimpleDialogProps): React.ReactElem const { map } = fetchMapById(mapId); useEffect(() => { - if (open && map) { + if (map) { setModel(map); - } else { - setModel(defaultModel); - setError(undefined); } }, [mapId]); diff --git a/packages/webapp/src/components/maps-page/action-dispatcher/rename-dialog/index.tsx b/packages/webapp/src/components/maps-page/action-dispatcher/rename-dialog/index.tsx index 4e612ef8..ec630878 100644 --- a/packages/webapp/src/components/maps-page/action-dispatcher/rename-dialog/index.tsx +++ b/packages/webapp/src/components/maps-page/action-dispatcher/rename-dialog/index.tsx @@ -60,11 +60,8 @@ const RenameDialog = ({ mapId, onClose }: SimpleDialogProps): React.ReactElement const { map } = fetchMapById(mapId); useEffect(() => { - if (open && map) { + if (map) { setModel(map); - } else { - setModel(defaultModel); - setError(undefined); } }, [mapId]);