import { View, Text, ScrollView, TouchableOpacity, ActivityIndicator } from 'react-native' import { useRouter } from 'expo-router' import { BottomNavBar } from '../src/components/BottomNavBar' import { usePlayerStore } from '../src/store/playerStore' import { useState, useEffect } from 'react' export default function LofiScreen() { const router = useRouter() const [channels, setChannels] = useState([]) const [loading, setLoading] = useState(true) useEffect(() => { fetchChannels() }, []) const fetchChannels = async () => { try { const res = await fetch('/api/lofi/channels') const data = await res.json() setChannels(data || []) } catch { setChannels([]) } finally { setLoading(false) } } return ( router.push('/account' as any)} className="w-10 h-10 rounded-full bg-music-card items-center justify-center"> 👤 LoFi Channels {loading ? ( ) : ( channels.map((ch: any) => ( 🎵 LoFi {ch.name} {ch.description} )) )} {channels.length === 0 && !loading && ( 🌙 No channels available )} ) }