diff --git a/TODO b/TODO index 7afb942..7af26f3 100644 --- a/TODO +++ b/TODO @@ -1,33 +1,18 @@ -//TODO readme +// TODO tests for tournament page: + - map and table mounts in tournament page <- get data to send to map/table ---------------------------------------------------------------- - -//TODO hover on table needs fixing - this only seemed to happen once I moved the logic into its own hook <- error is occurring on all hovers at the moment. Client/SSR issue? - -//TODO font size on mobile screen - -//TODO need a 'return to top' arrow button on smaller screens - -//TODO mobile map needs improving - -//TODO multi-language i18n support - https://nextjs.org/docs/app/building-your-application/routing/internationalization - -//TODO tests for tournois, testing the loading of map and table, then counting the markers - -//TODO logo for navbar and favicon - -//TODO document my new hook <- consider removing as I believe this is the reason hover is broken - -//TODO error handling - -//TODO e2e tests for tournament page: - - make sure number of markers = tournamentData.length - +//TODO SRP for web and API data fetching //TODO about page - //TODO contact page needs working mailer - -//TODO SEO - +//TODO font size on mobile screen +//TODO SEO - next headers etc +//TODO data fetching tests +//TODO redo layer groups tests +---------------------------------------------------------------- +//TODO logo for navbar and favicon +//TODO mobile map needs improving +//TODO multi-language i18n support - https://nextjs.org/docs/app/building-your-application/routing/internationalization +//TODO error handling //TODO consider offering GraphQL support - //TODO move smaller ui components into a new folder, and make them reusable - such as using generic prop names +//TODO readme diff --git a/app/api/tournaments/france/route.ts b/app/api/v1/tournaments/france/route.ts similarity index 74% rename from app/api/tournaments/france/route.ts rename to app/api/v1/tournaments/france/route.ts index c6f5c05..9b11c04 100644 --- a/app/api/tournaments/france/route.ts +++ b/app/api/v1/tournaments/france/route.ts @@ -3,8 +3,8 @@ import { dateOrderingFrance } from "@/utils/dbDateOrdering"; /** * Tournament data API endpoint - * @route /api/tournaments/france - * @internal + * @route /api/v1/tournaments/france + * @public */ export const revalidate = 3600; // revalidate cache every 6 hours export async function GET() { @@ -15,7 +15,11 @@ export async function GET() { const client = await clientPromise; const db = client.db("tournamentsFranceDB"); - const data = await dateOrderingFrance(db); + const results = await dateOrderingFrance(db); + const data = results.map(({ _id, __v, ...rest }) => ({ + id: _id, + ...rest, + })); return new Response(JSON.stringify(data), { status: 200, headers }); } catch (error) { diff --git a/app/contactez-nous/page.tsx b/app/contactez-nous/page.tsx index 6902a99..3006137 100644 --- a/app/contactez-nous/page.tsx +++ b/app/contactez-nous/page.tsx @@ -6,7 +6,10 @@ export default function Contact() {
-

+

Contactez-Nous

diff --git a/app/page.tsx b/app/page.tsx index 047203e..7fb3e4b 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -16,7 +16,9 @@ export default function Home() { />

-

Echecs France

+

+ Echecs France +

Trouvez Vos Tournois d'Echecs en France Sur Une Carte

diff --git a/app/qui-sommes-nous/page.tsx b/app/qui-sommes-nous/page.tsx index df40855..8c5c878 100644 --- a/app/qui-sommes-nous/page.tsx +++ b/app/qui-sommes-nous/page.tsx @@ -6,7 +6,10 @@ export default function About() {
-

+

Qui Sommes-Nous?

diff --git a/app/tournois/page.tsx b/app/tournois/page.tsx index f5176a1..03c69d1 100644 --- a/app/tournois/page.tsx +++ b/app/tournois/page.tsx @@ -37,11 +37,11 @@ export default async function Tournaments() { return ( -

+
-
+
diff --git a/components/Footer.tsx b/components/Footer.tsx index e2cb709..540e283 100644 --- a/components/Footer.tsx +++ b/components/Footer.tsx @@ -3,7 +3,10 @@ import { FaGithub, FaRegEnvelope } from "react-icons/fa"; export default function Footer() { return ( -