import { useState } from "react"; import { IconCheck, IconCopy } from "@tabler/icons-react"; import musicBrainzLogo from "../assets/musicbrainz.svg"; export default function RecordingMetadata({ mbId, isrc, }: { mbId?: string | null; isrc?: string | null; }) { const [copied, setCopied] = useState(""); const [error, setError] = useState(""); const recordingId = mbId?.trim(); const code = isrc?.trim(); if (!recordingId && !code) return null; return (
{recordingId && ( View on MusicBrainz )} {code && (
ISRC: {code} {error || (copied === code ? "Copied" : "")}
)}
); }