/* eslint-disable @typescript-eslint/no-unused-vars */ 'use client'; import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area"; import { useState, useEffect } from 'react'; import { Separator } from "@/components/ui/separator"; import { Tabs, TabsContent } from "@/components/ui/tabs"; import { ArtistIcon } from '@/app/components/artist-icon'; import { useNavidrome } from '@/app/components/NavidromeContext'; import { Artist } from '@/lib/navidrome'; import Loading from '@/app/components/loading'; export default function ArtistPage() { const { artists, isLoading } = useNavidrome(); const [sortedArtists, setSortedArtists] = useState([]); useEffect(() => { if (artists.length > 0) { // Sort artists alphabetically by name const sorted = [...artists].sort((a, b) => a.name.localeCompare(b.name)); setSortedArtists(sorted); } }, [artists]); if (isLoading) { return ; } return (

Artists

All artists in your music library ({sortedArtists.length} artists)

{sortedArtists.map((artist) => ( ))}
); }