import { useState } from 'react'; import { usePlayerStore } from '../store/playerStore'; import { MiniPlayer } from './MiniPlayer'; import { AudioPlayer } from './AudioPlayer'; import { Dialog, DialogContent, DialogTrigger } from '@/components/ui/dialog'; import { cn } from '@/lib/utils'; import { Maximize2, 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 bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60" />
); }