'use client'; import { useState, useEffect } from 'react'; import Link from 'next/link'; import Header from '@/components/Header'; import Footer from '@/components/Footer'; import { createClient } from '@/lib/supabase/client'; export default function GigsPage() { const supabase = createClient(); const [gigs, setGigs] = useState([]); const [loading, setLoading] = useState(true); useEffect(() => { const fetchGigs = async () => { const { data } = await supabase .from('marketplace_gigs') .select('*, marketplace_profiles!inner(slug, subscription_tier)') .eq('status', 'active') .order('created_at', { ascending: false }) .limit(50); setGigs(data || []); setLoading(false); }; fetchGigs(); }, []); return (
Marketplace / Gigs

Gig Board

{loading ? '...' : `${gigs.length} open gig${gigs.length !== 1 ? 's' : ''}`}

+ Post a Gig
💳 Gig posting requires a Pro subscription. Billing is coming soon — create your free profile now and post gigs when payments launch.
{loading ? (
{[...Array(4)].map((_, i) => (
))}
) : gigs.length === 0 ? (
🎬

No gigs posted yet

Be the first to post a crew call on AV Beat Marketplace.

) : (
{gigs.map((gig) => (

{gig.title}

{gig.marketplace_profiles?.subscription_tier === 'featured' && ( Featured )}
{gig.company}
📍 {gig.location} 🎬 {gig.gig_type} {gig.rate && 💵 {gig.rate}} {gig.start_date && ( 📅 {new Date(gig.start_date).toLocaleDateString('en-US', { month: 'short', day: 'numeric' })} {gig.end_date && ` – ${new Date(gig.end_date).toLocaleDateString('en-US', { month: 'short', day: 'numeric' })}`} )}
{new Date(gig.created_at).toLocaleDateString('en-US', { month: 'short', day: 'numeric' })}
{gig.description && (

{gig.description}

)} ))}
)}
); }