refactor: migrate Preact components to Astro

This commit is contained in:
Stefan Imhoff
2024-09-09 18:42:43 +02:00
parent d77c513b7b
commit 526fe22cda
130 changed files with 1154 additions and 1274 deletions

View File

@@ -0,0 +1,24 @@
---
// Cspell:words astro
import Book from './Book.astro';
import Link from './Link.astro';
interface Props {
alt?: string;
asin: string;
class?: string;
}
const { alt = '', asin, class: className, ...props } = Astro.props;
const amazonImageUrl = `https://images-na.ssl-images-amazon.com/images/P/${asin}.01.LZZZZZZZ.jpg`;
---
<Link
href={`http://www.amazon.de/gp/product/${asin}`}
class={className}
aria-label={alt}
{...props}
>
<Book alt={alt} src={amazonImageUrl} />
</Link>