mirror of
https://github.com/TheRealOwenRees/echecsfrance.git
synced 2026-11-18 07:22:06 +00:00
fix dead code with knip upgrade TS to v6 and fix linting errors auto apply oxfmt rules fix linting errors - unused deps etc ignore file remove all ignored files in knip add knip - dead code analysis tool swap prettier and eslint of oxfmt and oxlint fix: fix map rendering in react strict mode fix: headlessUI float replace fix: disable Matomo if not URL and SITE ID exist upgrade: 1st pass upgrade to Next.js v16 deps: upgrade react to v19
39 lines
979 B
TypeScript
39 lines
979 B
TypeScript
"use client";
|
|
|
|
import { useHydrateAtoms } from "jotai/utils";
|
|
import dynamic from "next/dynamic";
|
|
|
|
import { tournamentsAtom } from "@/atoms";
|
|
import LoadingMap from "@/components/LoadingMap";
|
|
import { Tournament } from "@/types";
|
|
|
|
import TournamentTable from "./TournamentTable";
|
|
|
|
type TournamentsDisplayProps = {
|
|
tournaments: Tournament[];
|
|
};
|
|
|
|
/**
|
|
* Imports the tournament map component, ensuring CSR only.
|
|
* @remarks SSR is not supported by react-leaflet
|
|
*/
|
|
const TournamentMap = dynamic(() => import("./TournamentMap"), {
|
|
ssr: false,
|
|
loading: LoadingMap,
|
|
});
|
|
|
|
export default function TournamentsDisplay({ tournaments }: TournamentsDisplayProps) {
|
|
useHydrateAtoms([[tournamentsAtom, tournaments]]);
|
|
|
|
return (
|
|
<main className="relative grid h-full w-full lg:grid-cols-2">
|
|
<div>
|
|
<TournamentMap />
|
|
</div>
|
|
<div className="relative bg-white dark:bg-gray-800 lg:overflow-y-auto">
|
|
<TournamentTable />
|
|
</div>
|
|
</main>
|
|
);
|
|
}
|