From dfc0f0da399ad6f7000611f6fec337bf5e528aa0 Mon Sep 17 00:00:00 2001 From: LunakisLeaks Date: Tue, 5 Nov 2024 02:18:49 +0200 Subject: [PATCH 1/8] Fixed footer appearing in the map page --- src/components/Map/Map.tsx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/components/Map/Map.tsx b/src/components/Map/Map.tsx index d10f34b2..17a41549 100644 --- a/src/components/Map/Map.tsx +++ b/src/components/Map/Map.tsx @@ -18,7 +18,6 @@ const numberFormat = new Intl.NumberFormat(); export interface LeafletMapProps { isFullPageMap: boolean; - className?: string; } @@ -29,6 +28,19 @@ const LeafletMap: FC = ({ isFullPageMap, className }) => { Telex.fetchAllConnections().then((flights) => setFlights(flights)); }, []); + useEffect(() => { + const footer = document.querySelector('footer'); + if (isFullPageMap && footer) { + footer.style.display = 'none'; + } + + return () => { + if (footer) { + footer.style.display = ''; + } + }; + }, [isFullPageMap]); + const position = [51, 5]; return ( @@ -79,4 +91,4 @@ const LeafletMap: FC = ({ isFullPageMap, className }) => { ); }; -export default LeafletMap; +export default LeafletMap; \ No newline at end of file From 820b5c638632a6924543afb584fdf490d338093e Mon Sep 17 00:00:00 2001 From: Gaudv Date: Tue, 5 Nov 2024 12:15:32 +0100 Subject: [PATCH 2/8] Fixed footer appearing in the map page with css --- src/styles/global.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/styles/global.scss b/src/styles/global.scss index 16d73a7b..8599bf35 100644 --- a/src/styles/global.scss +++ b/src/styles/global.scss @@ -31,3 +31,7 @@ .full-page-map .leaflet-control-zoom { margin-top: 72px !important; } + +.leaflet-container { + z-index: 999; +} \ No newline at end of file From 7abf00f232a282c401559fa30558d05d1caaab21 Mon Sep 17 00:00:00 2001 From: LunakisLeaks Date: Tue, 5 Nov 2024 20:39:18 +0200 Subject: [PATCH 3/8] Revert map.tsx file to the original code --- src/components/Map/Map.tsx | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/components/Map/Map.tsx b/src/components/Map/Map.tsx index 17a41549..97f37a16 100644 --- a/src/components/Map/Map.tsx +++ b/src/components/Map/Map.tsx @@ -28,19 +28,6 @@ const LeafletMap: FC = ({ isFullPageMap, className }) => { Telex.fetchAllConnections().then((flights) => setFlights(flights)); }, []); - useEffect(() => { - const footer = document.querySelector('footer'); - if (isFullPageMap && footer) { - footer.style.display = 'none'; - } - - return () => { - if (footer) { - footer.style.display = ''; - } - }; - }, [isFullPageMap]); - const position = [51, 5]; return ( From 75ad8ccf91afcec187671621a0f67c265ad0a863 Mon Sep 17 00:00:00 2001 From: LunakisLeaks Date: Wed, 6 Nov 2024 00:00:56 +0200 Subject: [PATCH 4/8] Revert fix --- src/components/Map/Map.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/Map/Map.tsx b/src/components/Map/Map.tsx index 97f37a16..09907c00 100644 --- a/src/components/Map/Map.tsx +++ b/src/components/Map/Map.tsx @@ -18,6 +18,7 @@ const numberFormat = new Intl.NumberFormat(); export interface LeafletMapProps { isFullPageMap: boolean; + className?: string; } From 4f0ac6499c60c6580f07528fc45e153f513b0add Mon Sep 17 00:00:00 2001 From: Albert R Date: Wed, 6 Nov 2024 01:49:17 -0400 Subject: [PATCH 5/8] fixed logos appearing in the LeafletMap . --- src/pages/map/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/map/index.tsx b/src/pages/map/index.tsx index 1f33294b..483cdd3a 100644 --- a/src/pages/map/index.tsx +++ b/src/pages/map/index.tsx @@ -6,7 +6,7 @@ import Section from '../../components/Utils/Section'; const LeafletMap = dynamic(() => import('../../components/Map/Map'), { ssr: false }); const Map: NextPage = () => ( -
+
); From adb399b39d18dc69c744e3c593013344da1b4fe3 Mon Sep 17 00:00:00 2001 From: LunakisLeaks Date: Wed, 6 Nov 2024 15:19:19 +0200 Subject: [PATCH 6/8] fix --- src/components/Map/Map.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Map/Map.tsx b/src/components/Map/Map.tsx index 09907c00..d10f34b2 100644 --- a/src/components/Map/Map.tsx +++ b/src/components/Map/Map.tsx @@ -79,4 +79,4 @@ const LeafletMap: FC = ({ isFullPageMap, className }) => { ); }; -export default LeafletMap; \ No newline at end of file +export default LeafletMap; From 3072317550e1daca5e1fb42aaf14e791362b7d37 Mon Sep 17 00:00:00 2001 From: Gauthier Canque <10694444+Gaudv@users.noreply.github.com> Date: Wed, 6 Nov 2024 18:19:14 +0100 Subject: [PATCH 7/8] Revert "Fixed footer appearing in the map page with css" --- src/styles/global.scss | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/styles/global.scss b/src/styles/global.scss index 58c9f31b..03e91b8a 100644 --- a/src/styles/global.scss +++ b/src/styles/global.scss @@ -34,8 +34,4 @@ .leaflet-div-icon { border: none !important; -} - -.leaflet-container { - z-index: 999; } \ No newline at end of file From 1e05e0e0677b57b4b3a82535f7a7dcc68794e590 Mon Sep 17 00:00:00 2001 From: LunakisDev <71980142+LunakisDev@users.noreply.github.com> Date: Fri, 8 Nov 2024 12:53:30 +0200 Subject: [PATCH 8/8] Update src/pages/map/index.tsx Co-authored-by: Nathan Innes --- src/pages/map/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/map/index.tsx b/src/pages/map/index.tsx index 483cdd3a..dd67184f 100644 --- a/src/pages/map/index.tsx +++ b/src/pages/map/index.tsx @@ -6,8 +6,8 @@ import Section from '../../components/Utils/Section'; const LeafletMap = dynamic(() => import('../../components/Map/Map'), { ssr: false }); const Map: NextPage = () => ( -
- +
+
);