theming and structure

This commit is contained in:
briannelson95
2025-06-23 16:38:52 -04:00
parent 1ec8d444f5
commit 23c8f468fe
14 changed files with 123 additions and 109 deletions

View File

@@ -1,7 +1,34 @@
import { queries } from '@/lib/queries'
import Link from 'next/link'
import React from 'react'
export default function DashboardPage() {
export default async function DashboardPage() {
const events = await queries.fetchEvents()
console.log(events)
return (
<div>DashboardPage</div>
<div>
<h1 className='text-2xl font-bold'>Dashboard</h1>
<div className='border rounded-lg max-w-6xl mx-auto p-6 space-y-4'>
<h2 className='text-xl font-bold'>Your Events</h2>
{events.map((item) => (
<div key={item.id}>
<p>ID: {item.id}</p>
<p>Name: {item.name}</p>
<p>Date: {item.date ? item.date.toISOString() : 'null'}</p>
<p>Location: {item.location ? item.location : 'null'}</p>
<p>Creator ID:{item.creatorId}</p>
<p>Created At:{item.createdAt.toISOString()}</p>
</div>
))}
<Link
href={'/events'}
className='underline'
>
See all events
</Link>
</div>
</div>
)
}