user creation and invites
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
import { queries } from '@/lib/queries'
|
||||
import React from 'react'
|
||||
|
||||
export default function SingleEventPage() {
|
||||
export default async function SingleEventPage({ params }: { params: { eventId: string }}) {
|
||||
console.log(params)
|
||||
const data = await queries.singleEvent(params.eventId)
|
||||
|
||||
return (
|
||||
<div>
|
||||
SINGLE EVENT PAGE
|
||||
<h1 className='text-4xl font-bold'>
|
||||
{data?.name}
|
||||
</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -10,10 +10,32 @@ export default async function EventsPage() {
|
||||
<div>
|
||||
Events
|
||||
<div>
|
||||
{allEvents.length == 0 && (
|
||||
{allEvents.length == 0 ? (
|
||||
<>
|
||||
You don't have any events yet. <Link href={'/events/create'} className='underline'>Create One!</Link>
|
||||
</>
|
||||
) : (
|
||||
<table className='table-auto w-full'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Event Name</th>
|
||||
<th>Event Date</th>
|
||||
<th>Created by</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{allEvents.map((item) => (
|
||||
<tr
|
||||
key={item.id}
|
||||
className='text-center'
|
||||
>
|
||||
<td className=''><Link href={`/events/${item.id}`}>{item.name}</Link></td>
|
||||
<td className=''>{item.date?.toDateString()}</td>
|
||||
<td className=''>{item.creatorId}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user