From 669406616a1cb5e2c8a4f13518e9af935da7a2c4 Mon Sep 17 00:00:00 2001 From: Fufeck Date: Wed, 2 Aug 2023 16:11:35 +0400 Subject: [PATCH 1/2] disbaled page dashboard --- pages/dashboard.js | 8 +++++++- pages/dashboard/departement.js | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/pages/dashboard.js b/pages/dashboard.js index fbcf73212..cc788c07d 100644 --- a/pages/dashboard.js +++ b/pages/dashboard.js @@ -38,7 +38,13 @@ function Index({basesLocales, basesLoclesStats}) { ) } -Index.getInitialProps = async () => { +Index.getInitialProps = async ({res}) => { + if (res) { + res.statusCode = 404 + res.end('Not found') + return + } + const basesLocales = await getBasesLocales() const basesLoclesStats = await getBasesLocalesStats() const basesLocalesWithoutDemo = basesLocales.filter((b => b.status !== 'demo')) diff --git a/pages/dashboard/departement.js b/pages/dashboard/departement.js index fbc69376f..fb31a378a 100644 --- a/pages/dashboard/departement.js +++ b/pages/dashboard/departement.js @@ -73,7 +73,13 @@ function Departement({departement, filteredCommunesInBAL, basesLocalesDepartemen ) } -Departement.getInitialProps = async ({query}) => { +Departement.getInitialProps = async ({res, query}) => { + if (res) { + res.statusCode = 404 + res.end('Not found') + return + } + const {codeDepartement} = query const departement = await getDepartement(codeDepartement) From 11b38947591e254ed8aa11ac7d0dd6a556898521 Mon Sep 17 00:00:00 2001 From: Guillaume Fay Date: Tue, 1 Aug 2023 17:36:55 +0200 Subject: [PATCH 2/2] fix: disable map rotation --- components/map/map.js | 1 + 1 file changed, 1 insertion(+) diff --git a/components/map/map.js b/components/map/map.js index 8644752ac..1c6b8455f 100644 --- a/components/map/map.js +++ b/components/map/map.js @@ -328,6 +328,7 @@ function Map({commune, isAddressFormOpen, handleAddressForm}) { onMouseLeave={handleMouseLeave} onMouseOut={handleMouseLeave} onViewportChange={setViewport} + dragRotate={false} >