diff --git a/src/components/events/EventCard.tsx b/src/components/events/EventCard.tsx index c5a0e4f..4e73c25 100644 --- a/src/components/events/EventCard.tsx +++ b/src/components/events/EventCard.tsx @@ -1,38 +1,159 @@ 'use server'; - -import EventCard from '@src/components/events/EventCard'; -import { api } from '@src/trpc/server'; +import { format, isSameDay } from 'date-fns'; +import Image from 'next/image'; import Link from 'next/link'; +import { MoreIcon } from '@src/icons/Icons'; +import { type RouterOutputs } from '@src/trpc/shared'; +import EventLikeButton from './EventLikeButton'; +import { getServerAuthSession } from '@src/server/auth'; +import dynamic from 'next/dynamic'; + +const EventTimeAlert = dynamic(() => import('./EventTimeAlert'), { + ssr: false, +}); + +type EventCardProps = { + event: RouterOutputs['event']['findByFilters']['events'][number]; +}; -const CommunityEvents = async () => { - const events = await api.userMetadata.getEvents(); - if (events.length === 0) { - return ( -
+ {event.description} +
+