import { useState } from 'react'; import { usePlayerStore } from '../store/playerStore'; import { MiniPlayer } from './MiniPlayer'; import { AudioPlayer } from './AudioPlayer'; import { Dialog, DialogContent } from '@/components/ui/dialog'; import { Minimize2 } from 'lucide-react'; import { Button } from '@/components/ui/button'; export function GlobalPlayer() { const currentTrack = usePlayerStore((state) => state.currentTrack); const [isExpanded, setIsExpanded] = useState(false); // Don't render anything if no track is playing (or perform null check inside components) if (!currentTrack) return null; return ( <> setIsExpanded(true)} className="border-t border-white/10 bg-kodo-void/80 backdrop-blur-xl shadow-[0_-4px_30px_rgba(0,0,0,0.5)] z-50" />
); }