'use client' import React, { useState } from 'react' import { Card, CardContent, CardFooter, CardHeader, CardTitle } from '../ui/card' import { Button } from '../ui/button' import Link from 'next/link' import EventInfoQuickView from '../EventInfoQuickView' import DialogWrapper from '../dialogs/DialogWrapper' import CreateEventForm from '../forms/CreateEventForm' interface EventsProps { events: { id: string name: string date?: Date | null creator: { id: string, username: string }, venue?: { name: string } | null }[] } export default function DashboardEvents({events}: EventsProps) { const [isDialogOpen, setIsDialogOpen] = useState(false) return ( <> Your Events setIsDialogOpen(true)} > Create Event {events.map((item) => ( ))} View all { // await refreshEventData(event.id) setIsDialogOpen(false) }} /> } /> > ) }