From bcc3c7497320a2a0c40224777e5e3d72f434f18d Mon Sep 17 00:00:00 2001 From: Owen Rees Date: Tue, 20 Jun 2023 15:00:59 +0200 Subject: [PATCH] scroll to top button added --- TODO | 3 +- app/tournois/page.tsx | 2 +- components/Footer.tsx | 2 +- components/ScrollToTopButton.tsx | 25 ++++++++++++++ components/SearchBar.tsx | 56 +++++++++++++++----------------- components/TournamentTable.tsx | 39 +++++++++++++++++----- handlers/scrollHandlers.ts | 8 +++++ types.ts | 2 ++ 8 files changed, 97 insertions(+), 40 deletions(-) create mode 100644 components/ScrollToTopButton.tsx create mode 100644 handlers/scrollHandlers.ts diff --git a/TODO b/TODO index aa654f0..883743c 100644 --- a/TODO +++ b/TODO @@ -5,7 +5,8 @@ //TODO about page //TODO contact page needs working mailer //TODO font size on mobile screen -//TODO need a 'return to top' arrow button on smaller screens +//TODO scroll to top button positioning +//TODO add test for return to top button //TODO SEO - next headers etc ---------------------------------------------------------------- //TODO logo for navbar and favicon diff --git a/app/tournois/page.tsx b/app/tournois/page.tsx index f5176a1..8d4c38f 100644 --- a/app/tournois/page.tsx +++ b/app/tournois/page.tsx @@ -37,7 +37,7 @@ export default async function Tournaments() { return ( -
+
diff --git a/components/Footer.tsx b/components/Footer.tsx index 20b7e05..540e283 100644 --- a/components/Footer.tsx +++ b/components/Footer.tsx @@ -4,7 +4,7 @@ import { FaGithub, FaRegEnvelope } from "react-icons/fa"; export default function Footer() { return (