import { View, Text, ScrollView, TouchableOpacity, TextInput, ActivityIndicator } from 'react-native' import { useRouter } from 'expo-router' import { BottomNavBar } from '../src/components/BottomNavBar' import { useState, useEffect } from 'react' export default function RadioScreen() { const router = useRouter() const [stations, setStations] = useState([]) const [loading, setLoading] = useState(true) const [search, setSearch] = useState('') useEffect(() => { fetchStations() }, []) const fetchStations = async () => { try { const res = await fetch('/api/radio/stations?limit=20') const data = await res.json() setStations(data.items || data || []) } catch { setStations([]) } finally { setLoading(false) } } const filtered = stations.filter(s => s.name?.toLowerCase().includes(search.toLowerCase())) return ( router.push('/account' as any)} className="w-10 h-10 rounded-full bg-music-card items-center justify-center"> 👤 Internet Radio 🔍 {loading ? ( Loading stations... ) : ( <> Browse Stations {filtered.map((station: any) => ( 📻 {station.name || 'Station'} {station.country_code || 'Local'} ))} {filtered.length === 0 && ( 📻 No stations found )} )} ) }