From ad618809f20f9c597a04482bae0143924d6d9a13 Mon Sep 17 00:00:00 2001 From: Timothy Armes Date: Fri, 7 Jul 2023 08:09:34 +0200 Subject: [PATCH] Fix layout issue (specifically to disallow scrolling on mobile) --- .eslintrc.json | 3 --- .vscode/settings.json | 3 +++ app/[lang]/components/HamburgerMenu.tsx | 3 +-- app/[lang]/components/TestableLayout.tsx | 6 ++---- app/[lang]/contactez-nous/page.tsx | 2 +- app/[lang]/page.tsx | 2 +- app/[lang]/qui-sommes-nous/page.tsx | 6 +++--- app/[lang]/tournois/TournamentMap.tsx | 2 +- app/[lang]/tournois/TournamentTable.tsx | 2 +- app/[lang]/tournois/TournamentsDisplay.tsx | 2 +- tailwind.config.js | 3 ++- 11 files changed, 16 insertions(+), 18 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 4e419a9..5292628 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -6,8 +6,5 @@ ], "globals": { "React": "readonly" - }, - "rules": { - "no-unused-vars": "warn" } } diff --git a/.vscode/settings.json b/.vscode/settings.json index 783d6d3..94198d8 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,10 +6,12 @@ "defaulticon", "Échecs", "Fédération", + "Florifourchette", "Française", "kodingdotninja", "Lente", "localisation", + "markercluster", "moveend", "randomisation", "Rapide", @@ -19,6 +21,7 @@ "Spiderfy", "spiderified", "tailwindcss", + "timothyarmes", "tournois", "unspiderfied", "unspiderfy" diff --git a/app/[lang]/components/HamburgerMenu.tsx b/app/[lang]/components/HamburgerMenu.tsx index 1c4861b..0025c64 100644 --- a/app/[lang]/components/HamburgerMenu.tsx +++ b/app/[lang]/components/HamburgerMenu.tsx @@ -9,7 +9,6 @@ import Link from "next-intl/link"; import { useTranslations } from "next-intl"; import useHamburgerClose from "@/hooks/useHamburgerClose"; -import ThemeSwitcher from "./ThemeSwitcher"; const HamburgerMenu = ({ menuVisible, @@ -25,7 +24,7 @@ const HamburgerMenu = ({ timeoutRef.current = setTimeout(() => { setMenuVisible(false); setMouseOverMenu(false); - }, 2000); + }, 4000); }; const handleMouseEnterMenu = () => { diff --git a/app/[lang]/components/TestableLayout.tsx b/app/[lang]/components/TestableLayout.tsx index 10d243a..dcc8188 100644 --- a/app/[lang]/components/TestableLayout.tsx +++ b/app/[lang]/components/TestableLayout.tsx @@ -16,11 +16,9 @@ const TestableLayout = ({ }) => { return ( -
+
-
- {children} -
+
{children}
diff --git a/app/[lang]/contactez-nous/page.tsx b/app/[lang]/contactez-nous/page.tsx index 69ac87a..8b51f60 100644 --- a/app/[lang]/contactez-nous/page.tsx +++ b/app/[lang]/contactez-nous/page.tsx @@ -7,7 +7,7 @@ export default function Contact() { return (
-
+

+
-
+
+

-
+

); } diff --git a/app/[lang]/tournois/TournamentMap.tsx b/app/[lang]/tournois/TournamentMap.tsx index 157f013..bc47b02 100644 --- a/app/[lang]/tournois/TournamentMap.tsx +++ b/app/[lang]/tournois/TournamentMap.tsx @@ -265,7 +265,7 @@ export default function TournamentMap() { }; return ( -
+
diff --git a/app/[lang]/tournois/TournamentTable.tsx b/app/[lang]/tournois/TournamentTable.tsx index 6b5d135..2f39bbf 100644 --- a/app/[lang]/tournois/TournamentTable.tsx +++ b/app/[lang]/tournois/TournamentTable.tsx @@ -46,7 +46,7 @@ export default function TournamentTable() { return (
diff --git a/app/[lang]/tournois/TournamentsDisplay.tsx b/app/[lang]/tournois/TournamentsDisplay.tsx index d4adf62..ad7c8bf 100644 --- a/app/[lang]/tournois/TournamentsDisplay.tsx +++ b/app/[lang]/tournois/TournamentsDisplay.tsx @@ -12,7 +12,7 @@ import TournamentTable from "./TournamentTable"; const LoadingMap = () => { const t = useTranslations("Tournaments"); return ( -
+

{t("loading")}

); diff --git a/tailwind.config.js b/tailwind.config.js index 5e5a9bb..4acee19 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -10,7 +10,8 @@ module.exports = { extend: { height: { // We use 100svh, falling back to vh for old browsers - screen: ['100vh', '100svh'], + // The 144px is for the header and footer + content: ['calc(100vh - 144px)', 'calc(100svh - 144px)'], } } },