import React from 'react'; import { Radio } from 'lucide-react'; import { api, Stream } from '@/lib/api'; import StreamCard from '../components/StreamCard'; async function getStreams(): Promise { try { return await api.getStreams(); } catch { return []; } } export default async function StreamsPage() { const streams = await getStreams(); const live = streams.filter((s) => s.status === 'live'); const offline = streams.filter((s) => s.status !== 'live'); return (
{live.length} camera{live.length !== 1 ? 's' : ''} live now

Wildlife Cameras

Free, 24/7 livestreams from Cape Coral's burrowing owl habitats and wildlife areas.

{streams.length === 0 && (

No cameras available

Check back soon or ensure the backend is running.

)} {live.length > 0 && (

Live Now

{live.map((s) => )}
)} {offline.length > 0 && (

Offline Cameras

{offline.map((s) => )}
)}
); }