diff --git a/src/app/(main)/events/[eventID]/page.tsx b/src/app/(main)/events/[eventID]/page.tsx index b9e01ca..f47493a 100644 --- a/src/app/(main)/events/[eventID]/page.tsx +++ b/src/app/(main)/events/[eventID]/page.tsx @@ -108,9 +108,7 @@ export default function ShowEvent() { - +
@@ -118,9 +116,7 @@ export default function ShowEvent() { created:
@@ -128,9 +124,7 @@ export default function ShowEvent() { updated:
@@ -142,18 +136,14 @@ export default function ShowEvent() { - +
- +
@@ -174,8 +164,7 @@ export default function ShowEvent() {
- {session.data?.user?.id === - eventData.data.event.organizer.id ? ( + {session.data?.user?.id === eventData.data.event.organizer.id ? ( Delete Event Are you sure you want to delete the event “ - {eventData.data.event.title}”? This action - cannot be undone. + {eventData.data.event.title}”? This action cannot be undone. @@ -231,8 +219,7 @@ export default function ShowEvent() { ) : null}
- {session.data?.user?.id === - eventData.data.event.organizer.id ? ( + {session.data?.user?.id === eventData.data.event.organizer.id ? ( = (props) => { error, } = usePostApiEvent(); const { data, isLoading, error: fetchError } = useGetApiUserMe(); - const { data: eventData } = useGetApiEventEventID(props.eventId!, { - query: { enabled: props.type === 'edit' }, - }); + const { data: eventData } = useGetApiEventEventID( + props.eventId!, + { + query: { enabled: props.type === 'edit' }, + }, + ); const patchEvent = usePatchApiEventEventID(); - const router = useRouter(); + const router = useRouter();; // State for date and time fields const [startDate, setStartDate] = React.useState(undefined); @@ -99,9 +102,7 @@ const EventForm: React.FC = (props) => { } setLocation(eventData?.data?.event.location || ''); setDescription(eventData?.data?.event.description || ''); - setSelectedParticipants( - eventData?.data?.event.participants?.map((u) => u.user) || [], - ); + setSelectedParticipants(eventData?.data?.event.participants?.map((u) => u.user) || []); } else if (props.type === 'create' && startFromUrl && endFromUrl) { // If creating a new event with URL params, set title and dates setTitle('');