From 33543b1f6406d2262855f8447a218e9057c94135 Mon Sep 17 00:00:00 2001 From: Teguono Date: Thu, 9 Nov 2023 14:38:44 -0600 Subject: [PATCH] fixed prettier issue --- components/Volunteer/FutureVolunteerEvents.tsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/components/Volunteer/FutureVolunteerEvents.tsx b/components/Volunteer/FutureVolunteerEvents.tsx index 7445085..3e6c789 100644 --- a/components/Volunteer/FutureVolunteerEvents.tsx +++ b/components/Volunteer/FutureVolunteerEvents.tsx @@ -72,16 +72,21 @@ const FutureVolunteerEvents = () => { const sortMostRecent = () => { if (!events) return; const copy = [...events]; - copy.sort((a, b) => new Date(b.startDate).valueOf() - new Date(a.startDate).valueOf()); + copy.sort( + (a, b) => + new Date(b.startDate).valueOf() - new Date(a.startDate).valueOf() + ); setEvents(copy); }; - // Sorts events in order of least to most recent const sortLeastRecent = () => { if (!events) return; const copy = [...events]; - copy.sort((a, b) => new Date(a.startDate).valueOf() - new Date(b.startDate).valueOf()); + copy.sort( + (a, b) => + new Date(a.startDate).valueOf() - new Date(b.startDate).valueOf() + ); setEvents(copy); }; @@ -140,7 +145,9 @@ const FutureVolunteerEvents = () => { {/* Container for events that show up based on query input */} {events - .filter(event => event.name.toLowerCase().includes(query.toLowerCase())) + .filter(event => + event.name.toLowerCase().includes(query.toLowerCase()) + ) .map(event => (