From 68b1e0f331f59785100b2913fd8b5cab6cdda258 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Un=20=C3=89picier?= Date: Fri, 4 Oct 2024 19:33:38 +0200 Subject: [PATCH] :lipstick: Fix point reference position & disable scroll --- app/globals.scss | 1 + app/hooks/useActions.ts | 1 + app/hooks/useData.ts | 5 ----- app/styles.scss | 1 + 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/globals.scss b/app/globals.scss index cd25b40..eccc074 100644 --- a/app/globals.scss +++ b/app/globals.scss @@ -19,6 +19,7 @@ body { width: 100svw; height: 100svh; background-color: #ffffff; + overflow: hidden; } a { diff --git a/app/hooks/useActions.ts b/app/hooks/useActions.ts index 9f6c094..2111355 100644 --- a/app/hooks/useActions.ts +++ b/app/hooks/useActions.ts @@ -64,6 +64,7 @@ export const useActions = ({ } setIsLoading(false); + setIsAddLoveOpened(false); } catch (error) { console.error(error); setAddLoveMessage('Erreur interne. Veuillez réessayer'); diff --git a/app/hooks/useData.ts b/app/hooks/useData.ts index 01cd8d5..caf4115 100644 --- a/app/hooks/useData.ts +++ b/app/hooks/useData.ts @@ -86,11 +86,6 @@ export const useData = () => { newLayers.push(userLayer); } - if (isAddLoveOpened) { - setLayers(newLayers); - return; - } - const datasetLayer = new IconLayer({ id: 'lovePoints', data: source, diff --git a/app/styles.scss b/app/styles.scss index 8b86ee9..cfb2318 100644 --- a/app/styles.scss +++ b/app/styles.scss @@ -13,6 +13,7 @@ position: absolute; top: 50%; left: 50%; + transform: translate(-50%, -100%); } }