import type { ReleasePreview } from '../types.js' import Cover from '../components/Cover.js' export default function ConfirmView({ code, preview, matchAlbumId, onSetMatch, onClearMatch, onAdd, adding, addError, }: { code: string | null preview: ReleasePreview matchAlbumId: number | null onSetMatch: (albumId: number) => void onClearMatch: () => void onAdd: () => void adding: boolean addError: string | null }) { const { release, duplicate, ripMatch, matchCandidates } = preview return (
{release.artist}
{[release.year, release.formats.join(', '), release.labels[0], release.catno] .filter(Boolean) .join(' · ')}
{code &&Barcode {code}
}In your digital collection ✓
)} {ripMatch === 'not_ripped' && (Not ripped yet
)} {ripMatch === 'ambiguous' && ( )} {duplicate && (Heads up: this release is already in your collection.
)}{addError}
}