import { queries } from '@/lib/queries' import Link from 'next/link' import React from 'react' export default async function EventsPage() { const allEvents = await queries.fetchEvents() console.log(allEvents) return (
Events
{allEvents.length == 0 ? ( <> You don't have any events yet. Create One! ) : ( {allEvents.map((item) => ( ))}
Event Name Event Date Created by
{item.name} {item.date?.toDateString()} {item.creatorId}
)}
) }