From 12619063283700742db82d719d27d03759c5017b Mon Sep 17 00:00:00 2001 From: "bhavnish.arora" Date: Wed, 29 Jan 2025 23:45:48 +0530 Subject: [PATCH] minor changes done --- src/components/Coach.jsx | 8 ++- src/components/Events.jsx | 30 +++++++---- src/components/Hero.jsx | 97 ++++++++++++++++++++++++------------ src/components/LoginForm.jsx | 9 +++- 4 files changed, 98 insertions(+), 46 deletions(-) diff --git a/src/components/Coach.jsx b/src/components/Coach.jsx index a1cf8db..fa53e63 100644 --- a/src/components/Coach.jsx +++ b/src/components/Coach.jsx @@ -8,8 +8,14 @@ const Coach = () => { const [message, setMessage] = useState(""); const [editingId, setEditingId] = useState(null); + // API URL const API_BASE_URL = import.meta.env.VITE_API_BASE_URL; + // Coaches SORTED + const sortedCoaches = coaches.sort( + (a, b) => new Date(b.createdAt) - new Date(a.createdAt) + ); + // Fetch coaches const fetchCoaches = async () => { try { @@ -154,7 +160,7 @@ const Coach = () => { {/* Coach List */}