From c0b54c6eb2fda7c807ee935880346b03b257632b Mon Sep 17 00:00:00 2001 From: Rama Priyanto Date: Mon, 19 May 2025 14:42:15 +0700 Subject: [PATCH] fix:next/image to heroui/image --- components/landing/HeaderNews.tsx | 6 +----- components/landing/MedolUpdate.tsx | 8 +------- components/landing/adds-carousel.tsx | 4 +--- components/landing/banner-new.tsx | 16 ++-------------- components/page/detail-news.tsx | 8 ++------ 5 files changed, 7 insertions(+), 35 deletions(-) diff --git a/components/landing/HeaderNews.tsx b/components/landing/HeaderNews.tsx index e3721d6..0584085 100644 --- a/components/landing/HeaderNews.tsx +++ b/components/landing/HeaderNews.tsx @@ -4,6 +4,7 @@ import { Card, CardFooter, CircularProgress, + Image, ScrollShadow, } from "@heroui/react"; import { ChevronLeftIcon, ChevronRightIcon, EyeIcon } from "../icons"; @@ -21,7 +22,6 @@ import { useTranslations } from "next-intl"; import { data } from "autoprefixer"; import { Controller as FormController } from "react-hook-form"; import { Nabla } from "next/font/google"; -import Image from "next/image"; export default function HeaderNews() { const [article, setArticle] = useState([]); @@ -121,8 +121,6 @@ export default function HeaderNews() { ? "/no-image.jpg" : newsItem?.thumbnailUrl } - width={480} - height={480} className="!w-[90vh] md:!w-[95vh] !h-[200px] md:!h-[400px] object-cover !rounded-b-none" /> @@ -251,8 +249,6 @@ export default function HeaderNews() { > headernews("mediahub"); @@ -181,8 +181,6 @@ export default function MedolUpdate() { > thumbnail thumbnail thumnail @@ -239,8 +237,6 @@ export default function BannerHumasNew() { : img?.contentFileUrl } alt={`humasbanner-${index}`} - width={1960} - height={1080} className="w-screen h-[45vh] lg:h-[93vh] object-cover object-center opacity-[25] dark:opacity-70 rounded-none" /> @@ -250,8 +246,6 @@ export default function BannerHumasNew() { {`humasbanner-1`} @@ -270,13 +264,7 @@ export default function BannerHumasNew() { OBYEKTIF - DIPERCAYA - PARTISIPASI

- logo-humas + logo-humas
diff --git a/components/page/detail-news.tsx b/components/page/detail-news.tsx index c0a4c01..b9a376d 100644 --- a/components/page/detail-news.tsx +++ b/components/page/detail-news.tsx @@ -4,7 +4,6 @@ import { formatMonthString, formatTextToHtmlTag, } from "@/utils/global"; -import Image from "next/image"; import { CalendarIcon, ChevronLeftIcon, @@ -26,6 +25,7 @@ import { useEffect, useState } from "react"; import { image } from "@heroui/theme"; import Cookies from "js-cookie"; import { saveActivity } from "@/services/activity-log"; +import { Image } from "@heroui/react"; const token = Cookies.get("access_token"); const uid = Cookies.get("uie"); @@ -155,8 +155,6 @@ export default function DetailNews(props: { data: any; listArticle: any }) {
{data?.files?.length > 0 && ( Main Image NextUI hero Image