scroll button fix

This commit is contained in:
Owen Rees
2023-06-20 15:37:08 +02:00
parent bcc3c74973
commit b90d7a25de
3 changed files with 11 additions and 7 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ export default async function Tournaments() {
<div className=""> <div className="">
<TournamentMap tournamentData={JSON.parse(tournamentData)} /> <TournamentMap tournamentData={JSON.parse(tournamentData)} />
</div> </div>
<div className="bg-white dark:bg-gray-800 lg:overflow-y-auto"> <div className="relative bg-white dark:bg-gray-800 lg:overflow-y-auto">
<TournamentTable tournamentData={JSON.parse(tournamentData)} /> <TournamentTable tournamentData={JSON.parse(tournamentData)} />
</div> </div>
</main> </main>
+1 -1
View File
@@ -11,7 +11,7 @@ const ScrollToTopButton = ({ isLgScreen }: { isLgScreen: boolean }) => {
const scrollToTopButtonClass = isLgScreen const scrollToTopButtonClass = isLgScreen
? "absolute bottom-0 right-3 p-10" ? "absolute bottom-0 right-3 p-10"
: "sticky top-20"; : "fixed top-20 right-3";
return ( return (
<button <button
+9 -5
View File
@@ -76,11 +76,15 @@ export default function TournamentTable({
className="tournament-table w-full grid auto-rows-max pb-20 lg:h-[calc(100vh-174px)] lg:col-start-2 lg:col-end-3 lg:overflow-y-scroll" className="tournament-table w-full grid auto-rows-max pb-20 lg:h-[calc(100vh-174px)] lg:col-start-2 lg:col-end-3 lg:overflow-y-scroll"
id="tournament-table" id="tournament-table"
> >
<SearchBar <div className="flex z-10">
tournamentFilter={searchQuery} <SearchBar
setTournamentFilter={setSearchQuery} tournamentFilter={searchQuery}
/> setTournamentFilter={setSearchQuery}
<ScrollToTopButton isLgScreen={isLgScreen} /> />
<div>
<ScrollToTopButton isLgScreen={isLgScreen} />
</div>
</div>
<table <table
className="relative table-fixed w-full text-center text-xs" className="relative table-fixed w-full text-center text-xs"
data-cy="tournament-table" data-cy="tournament-table"