From bd0993ed72a2133210c9085008c940cf56d82d9a Mon Sep 17 00:00:00 2001 From: Timothy Armes Date: Tue, 10 Oct 2023 10:01:15 +0200 Subject: [PATCH] Sort clubs --- app/[locale]/clubs/page.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/[locale]/clubs/page.tsx b/app/[locale]/clubs/page.tsx index 15f606b..b7f8c33 100644 --- a/app/[locale]/clubs/page.tsx +++ b/app/[locale]/clubs/page.tsx @@ -12,7 +12,11 @@ const getClubs = async () => { try { const client = await clientPromise; const db = client.db("tournamentsFranceDB"); - const data = await db.collection("clubs").find({}).toArray(); + const data = await db + .collection("clubs") + .find({}) + .sort({ name: 1 }) + .toArray(); return data .filter((c) => !!c.coordinates)