<script>
	let { src, fallback = '/images/default_cover.jpg', class: className = '' } = $props();

	async function handleError(e) {
		e.target.src = fallback;
	}
</script>

<img {src} onerror={handleError} class={className} alt="book cover" />
