table overflow fixed

This commit is contained in:
Owen Rees
2023-06-10 12:44:42 +02:00
parent fbefd7eaa0
commit a732508429
6 changed files with 31 additions and 11 deletions
-2
View File
@@ -8,8 +8,6 @@ tests for tournois, testing the loading of map and table, then counting the mark
logo for navbar and favicon logo for navbar and favicon
tournament table scroll
hover on table needs fixing - this only seemed to happen once I moved the logic into its own hook hover on table needs fixing - this only seemed to happen once I moved the logic into its own hook
document my new hook document my new hook
+11
View File
@@ -1,9 +1,20 @@
import Link from "next/link";
import { FaGithub } from "react-icons/fa";
export default function Footer() { export default function Footer() {
return ( return (
<footer className="grid grid-cols-2 bg-gray-800 text-white p-3"> <footer className="grid grid-cols-2 bg-gray-800 text-white p-3">
<div> <div>
<p>&copy; {new Date().getFullYear()} - Owen Rees</p> <p>&copy; {new Date().getFullYear()} - Owen Rees</p>
</div> </div>
<div>
<Link
href="https://github.com/TheRealOwenRees/echecsfrance"
target="_blank"
>
<FaGithub />
</Link>
</div>
</footer> </footer>
); );
} }
+1 -1
View File
@@ -13,7 +13,7 @@ export default function Navbar() {
</Link> </Link>
</div> </div>
<div className="flex w-full pt-2 justify-center md:w-1/2 md:justify-end"> <div className="flex w-full pt-2 justify-center md:w-1/2 md:justify-end">
<ul className="list-reset text-white no-underline flex flex-1 md:flex-none items-center"> <ul className="list-reset text-white no-underline flex flex-1 justify-around md:flex-none items-center">
<li className="mr-10"> <li className="mr-10">
<Link <Link
className="inline-block border-b-4 py-5 border-transparent hover:border-teal-600 transition-all ease-in-out duration-300" className="inline-block border-b-4 py-5 border-transparent hover:border-teal-600 transition-all ease-in-out duration-300"
+9 -8
View File
@@ -16,11 +16,12 @@ export default function TournamentTable({
setFilteredTournamentData(tournamentFilter); setFilteredTournamentData(tournamentFilter);
}, [tournamentFilter]); }, [tournamentFilter]);
console.log(filteredTournamentData.length);
const stickyHeader = "sticky top-0 p-3 bg-gray-600";
return ( return (
<section <section className="w-full grid auto-rows-max h-[calc(100vh-176px)] md:h-[calc(100vh-82px)] lg:h-[calc(100vh-132px)] lg:col-start-2 lg:col-end-3">
id="tournament-table"
className="w-full grid h-[calc(100vh-176px)] md:h-[calc(100vh-82px)] lg:h-[calc(100vh-132px)] lg:col-start-2 lg:col-end-3"
>
<SearchBar <SearchBar
tournamentFilter={tournamentFilter} tournamentFilter={tournamentFilter}
setTournamentFilter={setTournamentFilter} setTournamentFilter={setTournamentFilter}
@@ -28,10 +29,10 @@ export default function TournamentTable({
<table className="relative table-fixed w-full text-center text-xs"> <table className="relative table-fixed w-full text-center text-xs">
<thead className="bg-gray-600 text-white"> <thead className="bg-gray-600 text-white">
<tr> <tr>
<th className="sticky top-0 p-3 bg-gray-600">Date</th> <th className={stickyHeader}>Date</th>
<th className="sticky top-0 p-3 bg-gray-600">Ville</th> <th className={stickyHeader}>Ville</th>
<th className="sticky top-0 p-3 bg-gray-600">Tournois</th> <th className={stickyHeader}>Tournois</th>
<th className="sticky top-0 p-3 bg-gray-600">Cadence</th> <th className={stickyHeader}>Cadence</th>
</tr> </tr>
</thead> </thead>
<tbody>{filteredTournamentData}</tbody> <tbody>{filteredTournamentData}</tbody>
+9
View File
@@ -21,6 +21,7 @@
"postcss": "8.4.23", "postcss": "8.4.23",
"react": "18.2.0", "react": "18.2.0",
"react-dom": "18.2.0", "react-dom": "18.2.0",
"react-icons": "^4.9.0",
"react-leaflet": "^4.2.1", "react-leaflet": "^4.2.1",
"tailwindcss": "3.3.2", "tailwindcss": "3.3.2",
"typescript": "5.0.4" "typescript": "5.0.4"
@@ -8061,6 +8062,14 @@
"react": "^18.2.0" "react": "^18.2.0"
} }
}, },
"node_modules/react-icons": {
"version": "4.9.0",
"resolved": "https://registry.npmjs.org/react-icons/-/react-icons-4.9.0.tgz",
"integrity": "sha512-ijUnFr//ycebOqujtqtV9PFS7JjhWg0QU6ykURVHuL4cbofvRCf3f6GMn9+fBktEFQOIVZnuAYLZdiyadRQRFg==",
"peerDependencies": {
"react": "*"
}
},
"node_modules/react-is": { "node_modules/react-is": {
"version": "16.13.1", "version": "16.13.1",
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
+1
View File
@@ -26,6 +26,7 @@
"postcss": "8.4.23", "postcss": "8.4.23",
"react": "18.2.0", "react": "18.2.0",
"react-dom": "18.2.0", "react-dom": "18.2.0",
"react-icons": "^4.9.0",
"react-leaflet": "^4.2.1", "react-leaflet": "^4.2.1",
"tailwindcss": "3.3.2", "tailwindcss": "3.3.2",
"typescript": "5.0.4" "typescript": "5.0.4"