From 841356adf5c7267484fe5c678901c3eb782fb5eb Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi <256895@studenti.unimore.it> Date: Tue, 11 May 2021 18:05:01 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20bugs=20in=20RepositoryEdit?= =?UTF-8?q?or?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/interactive/BoxConditionMap.js | 2 +- .../interactive/BoxRepositoryCreate.js | 33 ++++++++++++------- .../components/interactive/ConditionBadge.js | 1 - .../interactive/RepositorySummaryBase.js | 14 +++++--- .../RepositorySummaryBase.module.css | 22 +++++++++---- .../components/providers/RepositoryEditor.js | 33 +++++++++++-------- code/frontend/src/routes/PageEdit.js | 9 +++-- code/frontend/src/utils/goToOnSuccess.js | 16 ++++----- code/frontend/src/utils/renderContents.js | 2 +- 9 files changed, 83 insertions(+), 49 deletions(-) diff --git a/code/frontend/src/components/interactive/BoxConditionMap.js b/code/frontend/src/components/interactive/BoxConditionMap.js index cc2c173..9431820 100644 --- a/code/frontend/src/components/interactive/BoxConditionMap.js +++ b/code/frontend/src/components/interactive/BoxConditionMap.js @@ -81,7 +81,7 @@ export default function BoxConditionMap({ ...props }) { map.off("zoom", onZoom) } }, - [map], + [map, onMove, onZoom], ) const onButtonClick = () => { diff --git a/code/frontend/src/components/interactive/BoxRepositoryCreate.js b/code/frontend/src/components/interactive/BoxRepositoryCreate.js index e558253..b47b132 100644 --- a/code/frontend/src/components/interactive/BoxRepositoryCreate.js +++ b/code/frontend/src/components/interactive/BoxRepositoryCreate.js @@ -3,7 +3,7 @@ import BoxFull from "../base/BoxFull" import FormLabelled from "../base/FormLabelled" import FormLabel from "../base/formparts/FormLabel" import InputWithIcon from "../base/InputWithIcon" -import { faFolder, faPencilAlt, faPlus } from "@fortawesome/free-solid-svg-icons" +import { faBackward, faFolder, faPencilAlt, faPlus } from "@fortawesome/free-solid-svg-icons" import Radio from "../base/Radio" import Button from "../base/Button" import useRepositoryEditor from "../../hooks/useRepositoryEditor" @@ -27,6 +27,7 @@ export default function BoxRepositoryCreate({ ...props }) { name, setName, save, + revert, error, } = useRepositoryEditor() @@ -55,7 +56,7 @@ export default function BoxRepositoryCreate({ ...props }) { onChange={() => setEvaluationMode(0)} checked={evaluationMode === 0} /> - At least one filter + One filter