diff --git a/TODO b/TODO index 6724f3e..56f6f90 100644 --- a/TODO +++ b/TODO @@ -1,16 +1,12 @@ TESTS // TODO tests for tournament page: - map and table mounts in tournament page <- get data to send to map/table -//TODO data fetching tests -//TODO redo layer groups tests -//TODO write tests for contact form -//TODO dead link tests take too long, split them into separate tests per page ----------------------------------------------------------------- BUGS //TODO about page is not centred in Safari //TODO tournament page load is weird on 2nd click. On safari it pauses for a few seconds. Is it trying to load the entire page before displaying? -//TODO Nodemailer 'from' reverts to echecsfrance@gmail.com +//TODO Nodemailer 'from' reverts to echecsfrance@gmail.com - quick fix done with sender address in subject line ---------------------------------------------------------------- PAGES @@ -20,23 +16,19 @@ PAGES DESIGN CHANGES //TODO test entire site for english to french translations //TODO success and error messages into french - mailer -//TODO disable send message button while sending - isSending = true //TODO font size on mobile screen -//TODO bottom of map is a few pixels short -//TODO mobile navbar is creeping into the page by a few pixels when hidden - move it to the right a bit. It is easier to see in light mode +//TODO mobile navbar is creeping into the page by a few pixels when hidden - move it to the right a bit. It is easier to see in light mode. I cant see this on Linux //TODO logo for navbar and favicon //TODO mobile map needs improving ---------------------------------------------------------------- LOGIC -//TODO SRP for web and API data fetching //TODO error handling //TODO consider offering GraphQL support MISC ---------------------------------------------------------------- //TODO write logger (fullstack open examples) -//TODO SEO - next headers etc //TODO multi-language i18n support - https://nextjs.org/docs/app/building-your-application/routing/internationalization //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/v1/tournaments/france/route.ts b/app/api/v1/tournaments/france/route.ts index afcd444..0ccd2c1 100644 --- a/app/api/v1/tournaments/france/route.ts +++ b/app/api/v1/tournaments/france/route.ts @@ -14,7 +14,6 @@ export async function GET() { try { const client = await clientPromise; const db = client.db("tournamentsFranceDB"); - const results = await dateOrderingFrance(db); const data = results.map(({ _id, ...rest }) => ({ id: _id, diff --git a/app/contactez-nous/page.tsx b/app/contactez-nous/page.tsx index b2e8bde..8a8a2b3 100644 --- a/app/contactez-nous/page.tsx +++ b/app/contactez-nous/page.tsx @@ -9,7 +9,7 @@ export default function Contact() {

Contactez-Nous

diff --git a/app/layout.tsx b/app/layout.tsx index f09c65b..50bb68a 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -7,7 +7,8 @@ const inter = Inter({ subsets: ["latin"] }); export const metadata = { title: "Echecs France", - description: "Generated by create next app", // TODO give the website a description + maybe keywords if they go here + description: "Trouvez Vos Tournois d'Echecs en France Sur Une Carte", + keywords: "echecs, France, tournoi, tournois, FFE", }; export default function RootLayout({ diff --git a/app/page.tsx b/app/page.tsx index 7fb3e4b..1f60bcd 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -16,7 +16,7 @@ export default function Home() { />
-

+

Echecs France

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

Qui Sommes-Nous?

diff --git a/app/tournois/page.tsx b/app/tournois/page.tsx index 03c69d1..c6cc6e9 100644 --- a/app/tournois/page.tsx +++ b/app/tournois/page.tsx @@ -23,9 +23,7 @@ const getTournaments = async () => { try { const client = await clientPromise; const db = client.db("tournamentsFranceDB"); - const data = await dateOrderingFrance(db); - return JSON.stringify(data); } catch (error) { throw new Error("Error fetching tournament data"); diff --git a/components/ContactForm.tsx b/components/ContactForm.tsx index d80148a..6a2a3c0 100644 --- a/components/ContactForm.tsx +++ b/components/ContactForm.tsx @@ -17,6 +17,7 @@ const ContactForm = () => { className={`${ responseMessage.isSuccessful ? "text-green-600" : "text-red-600" } italic`} + data-test="info-message" > {responseMessage.message}

@@ -51,6 +52,7 @@ const ContactForm = () => { className="shadow-sm bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500 dark:shadow-sm-light" placeholder="nom@exemple.com" required + data-test="email-input" />
@@ -68,6 +70,7 @@ const ContactForm = () => { className="block p-3 w-full text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500 dark:shadow-sm-light" placeholder="Le motif de ma demande" required + data-test="subject-input" />
@@ -84,12 +87,15 @@ const ContactForm = () => { rows={6} className="block p-2.5 w-full text-sm text-gray-900 bg-gray-50 rounded-lg shadow-sm border border-gray-300 focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500" placeholder="Détaillez ici votre demande..." + data-test="message-input" + required >
diff --git a/components/Footer.tsx b/components/Footer.tsx index 540e283..3df5be8 100644 --- a/components/Footer.tsx +++ b/components/Footer.tsx @@ -5,7 +5,7 @@ export default function Footer() { return (