refactor: replaced the Image component with Picture component

Picture is no longer experimental and offers semantic HTML renders
This commit is contained in:
kashan-ahmad
2023-11-17 18:49:45 +05:00
parent 8d2ce5d19d
commit b7e09cf4c3
3 changed files with 6 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
---
import { Image } from "astro:assets";
import { Picture } from "astro:assets";
import heroImage from "assets/hero.png";
import Link from "@components/ui/link.astro";
import { Icon } from "astro-icon";
@@ -8,7 +8,7 @@ import { Icon } from "astro-icon";
<main
class="grid lg:grid-cols-2 place-items-center pt-16 pb-8 md:pt-12 md:pb-24">
<div class="py-6 md:order-1 hidden md:block">
<Image
<Picture
src={heroImage}
alt="Astronaut in the air"
widths={[200, 400, 600]}