From ac1956a1716bd8169de7f9c154334bccd6fb2a8e Mon Sep 17 00:00:00 2001 From: Mikael Siidorow Date: Tue, 23 Jan 2024 10:36:07 +0200 Subject: [PATCH] optimize hero images with next/image --- apps/web/src/components/hero/index.tsx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/apps/web/src/components/hero/index.tsx b/apps/web/src/components/hero/index.tsx index 34a37a9f..cbf53c01 100644 --- a/apps/web/src/components/hero/index.tsx +++ b/apps/web/src/components/hero/index.tsx @@ -1,5 +1,6 @@ "use client"; +import Image from "next/image"; import { useEffect, useState } from "react"; import { cn } from "../../lib/utils"; @@ -20,16 +21,19 @@ export function Hero({ images, text }: { images: string[]; text: string }) { return (
- {images.map((image, idx) => ( -
( + ))}