import { useEffect, useState } from "react"; import { deleteVoice, listVoices, setFavorite, type VoiceRecord } from "@/lib/idb"; import { cn } from "@/lib/utils"; type Props = { selectedId?: number; onSelect: (v: VoiceRecord) => void; refreshKey?: number; }; export default function VoiceLibrary({ selectedId, onSelect, refreshKey }: Props) { const [voices, setVoices] = useState([]); useEffect(() => { listVoices().then(setVoices); }, [refreshKey]); if (voices.length === 0) { return

No saved voices yet.

; } return ( ); }