From 740b788246cdb2a2c740b4cbfd4b0f55bac56d72 Mon Sep 17 00:00:00 2001 From: Maciej Ziarkowski Date: Wed, 30 Oct 2019 12:28:10 +0000 Subject: [PATCH] Only accept view/edit modes for building view --- app/src/frontend/building/building-view.tsx | 2 +- app/src/frontend/building/data-container.tsx | 2 +- app/src/frontend/map-app.tsx | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/frontend/building/building-view.tsx b/app/src/frontend/building/building-view.tsx index d322d984..e66a93ee 100644 --- a/app/src/frontend/building/building-view.tsx +++ b/app/src/frontend/building/building-view.tsx @@ -19,7 +19,7 @@ import { Building } from '../models/building'; interface BuildingViewProps { cat: string; - mode: 'view' | 'edit' | 'multi-edit'; + mode: 'view' | 'edit'; building: Building; building_like: boolean; user: any; diff --git a/app/src/frontend/building/data-container.tsx b/app/src/frontend/building/data-container.tsx index a7294720..db903baa 100644 --- a/app/src/frontend/building/data-container.tsx +++ b/app/src/frontend/building/data-container.tsx @@ -20,7 +20,7 @@ interface DataContainerProps { inactive?: boolean; user: User; - mode: 'view' | 'edit' | 'multi-edit'; + mode: 'view' | 'edit'; building: Building; building_like: boolean; selectBuilding: (building: Building) => void diff --git a/app/src/frontend/map-app.tsx b/app/src/frontend/map-app.tsx index 9e5d6e05..7849a56d 100644 --- a/app/src/frontend/map-app.tsx +++ b/app/src/frontend/map-app.tsx @@ -221,6 +221,7 @@ class MapApp extends React.Component { render() { const mode = this.props.match.params.mode; + const viewEditMode = mode === 'multi-edit' ? undefined : mode; let category = this.state.category || 'age'; @@ -246,7 +247,7 @@ class MapApp extends React.Component {