"use client"; type Stop = { id: string; city: string; state: string; date: string; time: string; location: string; active: boolean; brands: { name: string } | { name: string }[]; }; export default function StopTableBody({ stops }: { stops: Stop[] }) { return ( {stops?.map((stop) => ( (window.location.href = `/admin/stops/${stop.id}`) } className="cursor-pointer hover:bg-zinc-800" > {stop.city}, {stop.state} {stop.location} {stop.date} {stop.time} {Array.isArray(stop.brands) ? stop.brands[0]?.name : stop.brands?.name} {stop.active ? "Active" : "Inactive"} ))} ); }