'use client'; import EventForm from '@/components/custom/EventForm'; import FeaturedEvent from '@/components/custom/FeaturedEvent'; import Footer from '@/components/custom/footer'; import Header from '@/components/custom/header'; import { Button } from '@/components/ui/button'; import { FlipWords } from '@/components/ui/flip-words'; import { useRouter } from 'next/navigation'; import React, { useEffect, useRef, useState } from 'react'; import { motion } from 'framer-motion'; import { EventFormData } from '@/components/custom/EventForm'; const Page = () => { const router = useRouter(); const [isClient, setIsClient] = useState(false); const inputRef = useRef(null); useEffect(() => { setIsClient(true); }, []); function searchForEvents() { if (inputRef.current && inputRef.current.value === '') return; if (inputRef.current) router.replace('/events?q=' + encodeURIComponent(inputRef.current.value)); } function handleSubmit(data: { name: string; description: string; capacity: number; ticketPrice: number; location: string; eventStartTime: Date; eventEndTime?: Date | undefined; images?: string[] | undefined; }) { // Logic for handling the form submission console.log('Event data submitted:', data); // You can replace the console log with an API call or any other handling logic router.push('/events'); } const words = [ 'adventure', 'concert', 'outing', 'journey', 'hackathon', 'conference', ]; return ( <>
{/* Video Background */} {isClient && ( )} {/* Dark Overlay for Enhanced Readability */}
{/* Page Content Over the Video */}
Create your event here!
); }; export default Page;