'use client';
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
import { Separator } from "@/components/ui/separator";
import { Tabs, TabsContent } from "@/components/ui/tabs";
import { useNavidrome } from '@/app/components/NavidromeContext';
import Loading from '@/app/components/loading';
import { Button } from '@/components/ui/button';
import { PlusCircledIcon } from "@radix-ui/react-icons";
import Link from 'next/link';
const PlaylistsPage: React.FC = () => {
const { playlists, isLoading, createPlaylist } = useNavidrome();
const handleCreatePlaylist = async () => {
const name = prompt('Enter playlist name:');
if (name) {
try {
await createPlaylist(name);
} catch (error) {
console.error('Failed to create playlist:', error);
}
}
};
if (isLoading) {
return
Playlists
Your custom playlists ({playlists.length} playlists)
{playlist.name}
{playlist.songCount} songs
{playlist.comment && ({playlist.comment}
)}