Files
chitai/frontend/src/lib/components/view/book-image.svelte
T
patrick 3a29294f96 chore: clear the mechanical lint and type findings
Dead imports and locals removed, each blocks keyed, `any` narrowed to unknown.
Two context setters kept their calls and lost only the unused binding; the
settings redirect no longer awaits a parent whose data it discards. A leading
underscore now marks a binding that only holds a position.
2026-08-17 17:55:21 -04:00

12 lines
322 B
Svelte

<script>
let { src, fallback = '/images/default_cover.jpg', class: className = '' } = $props();
/** @param {Event} e */
function handleError(e) {
const img = /** @type {HTMLImageElement} */ (e.currentTarget);
img.src = fallback;
}
</script>
<img {src} onerror={handleError} class={className} alt="book cover" />