fix:next/image to heroui/image
This commit is contained in:
parent
4a0354fb1f
commit
c0b54c6eb2
|
|
@ -4,6 +4,7 @@ import {
|
||||||
Card,
|
Card,
|
||||||
CardFooter,
|
CardFooter,
|
||||||
CircularProgress,
|
CircularProgress,
|
||||||
|
Image,
|
||||||
ScrollShadow,
|
ScrollShadow,
|
||||||
} from "@heroui/react";
|
} from "@heroui/react";
|
||||||
import { ChevronLeftIcon, ChevronRightIcon, EyeIcon } from "../icons";
|
import { ChevronLeftIcon, ChevronRightIcon, EyeIcon } from "../icons";
|
||||||
|
|
@ -21,7 +22,6 @@ import { useTranslations } from "next-intl";
|
||||||
import { data } from "autoprefixer";
|
import { data } from "autoprefixer";
|
||||||
import { Controller as FormController } from "react-hook-form";
|
import { Controller as FormController } from "react-hook-form";
|
||||||
import { Nabla } from "next/font/google";
|
import { Nabla } from "next/font/google";
|
||||||
import Image from "next/image";
|
|
||||||
|
|
||||||
export default function HeaderNews() {
|
export default function HeaderNews() {
|
||||||
const [article, setArticle] = useState<any>([]);
|
const [article, setArticle] = useState<any>([]);
|
||||||
|
|
@ -121,8 +121,6 @@ export default function HeaderNews() {
|
||||||
? "/no-image.jpg"
|
? "/no-image.jpg"
|
||||||
: newsItem?.thumbnailUrl
|
: newsItem?.thumbnailUrl
|
||||||
}
|
}
|
||||||
width={480}
|
|
||||||
height={480}
|
|
||||||
className="!w-[90vh] md:!w-[95vh] !h-[200px] md:!h-[400px] object-cover !rounded-b-none"
|
className="!w-[90vh] md:!w-[95vh] !h-[200px] md:!h-[400px] object-cover !rounded-b-none"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
@ -251,8 +249,6 @@ export default function HeaderNews() {
|
||||||
>
|
>
|
||||||
<Image
|
<Image
|
||||||
alt="headernews"
|
alt="headernews"
|
||||||
width={480}
|
|
||||||
height={480}
|
|
||||||
src={
|
src={
|
||||||
newsItem?.thumbnailUrl == ""
|
newsItem?.thumbnailUrl == ""
|
||||||
? "/no-image.jpg"
|
? "/no-image.jpg"
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import {
|
||||||
Card,
|
Card,
|
||||||
CardBody,
|
CardBody,
|
||||||
CardFooter,
|
CardFooter,
|
||||||
|
Image,
|
||||||
Spinner,
|
Spinner,
|
||||||
Tab,
|
Tab,
|
||||||
Tabs,
|
Tabs,
|
||||||
|
|
@ -24,7 +25,6 @@ import {
|
||||||
import { convertDateFormatNoTime, textEllipsis } from "@/utils/global";
|
import { convertDateFormatNoTime, textEllipsis } from "@/utils/global";
|
||||||
import PolriTvWidget from "../ui/social-media/polri-tv";
|
import PolriTvWidget from "../ui/social-media/polri-tv";
|
||||||
import { useTranslations } from "next-intl";
|
import { useTranslations } from "next-intl";
|
||||||
import Image from "next/image";
|
|
||||||
|
|
||||||
export default function MedolUpdate() {
|
export default function MedolUpdate() {
|
||||||
const [selectedTab, setSelectedTab] = useState<any>("mediahub");
|
const [selectedTab, setSelectedTab] = useState<any>("mediahub");
|
||||||
|
|
@ -181,8 +181,6 @@ export default function MedolUpdate() {
|
||||||
>
|
>
|
||||||
<CardBody className="overflow-visible p-0">
|
<CardBody className="overflow-visible p-0">
|
||||||
<Image
|
<Image
|
||||||
width={480}
|
|
||||||
height={480}
|
|
||||||
alt="thumbnail"
|
alt="thumbnail"
|
||||||
className="object-cover !h-[20vh]"
|
className="object-cover !h-[20vh]"
|
||||||
// src={newsItem.thumbnailLink}
|
// src={newsItem.thumbnailLink}
|
||||||
|
|
@ -272,8 +270,6 @@ export default function MedolUpdate() {
|
||||||
>
|
>
|
||||||
<CardBody className="overflow-visible p-0">
|
<CardBody className="overflow-visible p-0">
|
||||||
<Image
|
<Image
|
||||||
width={480}
|
|
||||||
height={480}
|
|
||||||
alt="thumbnail"
|
alt="thumbnail"
|
||||||
className="object-cover !h-[20vh]"
|
className="object-cover !h-[20vh]"
|
||||||
src={newsItem?.image}
|
src={newsItem?.image}
|
||||||
|
|
@ -365,8 +361,6 @@ export default function MedolUpdate() {
|
||||||
>
|
>
|
||||||
<CardBody className="overflow-visible p-0">
|
<CardBody className="overflow-visible p-0">
|
||||||
<Image
|
<Image
|
||||||
width={480}
|
|
||||||
height={480}
|
|
||||||
alt="thumnail"
|
alt="thumnail"
|
||||||
className="object-cover !h-[20vh]"
|
className="object-cover !h-[20vh]"
|
||||||
src={newsItem?.thumbnail}
|
src={newsItem?.thumbnail}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import Image from "next/image";
|
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
Card,
|
Card,
|
||||||
CardFooter,
|
CardFooter,
|
||||||
CircularProgress,
|
CircularProgress,
|
||||||
|
Image,
|
||||||
ScrollShadow,
|
ScrollShadow,
|
||||||
} from "@heroui/react";
|
} from "@heroui/react";
|
||||||
import {
|
import {
|
||||||
|
|
@ -138,8 +138,6 @@ export default function AddsCarousel() {
|
||||||
// )
|
// )
|
||||||
<Image
|
<Image
|
||||||
alt="headernews"
|
alt="headernews"
|
||||||
width={1440}
|
|
||||||
height={1080}
|
|
||||||
className="w-full h-[20vh] lg:!h-[50vh] object-cover rounded-lg"
|
className="w-full h-[20vh] lg:!h-[50vh] object-cover rounded-lg"
|
||||||
src={
|
src={
|
||||||
newsItem?.contentFileUrl == ""
|
newsItem?.contentFileUrl == ""
|
||||||
|
|
|
||||||
|
|
@ -34,12 +34,12 @@ import {
|
||||||
PopoverContent,
|
PopoverContent,
|
||||||
Accordion,
|
Accordion,
|
||||||
AccordionItem,
|
AccordionItem,
|
||||||
|
Image,
|
||||||
} from "@heroui/react";
|
} from "@heroui/react";
|
||||||
import storedLanguage from "@/store/language-store";
|
import storedLanguage from "@/store/language-store";
|
||||||
import { ThemeSwitch } from "../theme-switch";
|
import { ThemeSwitch } from "../theme-switch";
|
||||||
import { siteConfig, SiteConfig } from "@/config/site";
|
import { siteConfig, SiteConfig } from "@/config/site";
|
||||||
import { getAdvertise } from "@/services/advertisement";
|
import { getAdvertise } from "@/services/advertisement";
|
||||||
import Image from "next/image";
|
|
||||||
|
|
||||||
const images = [
|
const images = [
|
||||||
"/landing-1.jpg",
|
"/landing-1.jpg",
|
||||||
|
|
@ -129,8 +129,6 @@ export default function BannerHumasNew() {
|
||||||
{withImage && (
|
{withImage && (
|
||||||
<Image
|
<Image
|
||||||
alt="logo"
|
alt="logo"
|
||||||
width={1960}
|
|
||||||
height={1080}
|
|
||||||
src={menu.img}
|
src={menu.img}
|
||||||
className="w-[45px] h-[45px]"
|
className="w-[45px] h-[45px]"
|
||||||
/>
|
/>
|
||||||
|
|
@ -239,8 +237,6 @@ export default function BannerHumasNew() {
|
||||||
: img?.contentFileUrl
|
: img?.contentFileUrl
|
||||||
}
|
}
|
||||||
alt={`humasbanner-${index}`}
|
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"
|
className="w-screen h-[45vh] lg:h-[93vh] object-cover object-center opacity-[25] dark:opacity-70 rounded-none"
|
||||||
/>
|
/>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
@ -250,8 +246,6 @@ export default function BannerHumasNew() {
|
||||||
<Image
|
<Image
|
||||||
src={images[0]}
|
src={images[0]}
|
||||||
alt={`humasbanner-1`}
|
alt={`humasbanner-1`}
|
||||||
width={1960}
|
|
||||||
height={1080}
|
|
||||||
className="w-screen h-[45vh] lg:h-[93vh] object-cover object-center opacity-[25] dark:opacity-70 rounded-none"
|
className="w-screen h-[45vh] lg:h-[93vh] object-cover object-center opacity-[25] dark:opacity-70 rounded-none"
|
||||||
/>
|
/>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
@ -270,13 +264,7 @@ export default function BannerHumasNew() {
|
||||||
OBYEKTIF - DIPERCAYA - PARTISIPASI
|
OBYEKTIF - DIPERCAYA - PARTISIPASI
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<Image
|
<Image src="/divhumas.png" alt="logo-humas" className="w-[200px]" />
|
||||||
src="/divhumas.png"
|
|
||||||
alt="logo-humas"
|
|
||||||
className="w-[200px]"
|
|
||||||
width={1960}
|
|
||||||
height={1080}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-col lg:flex-row lg:justify-between gap-4 mt-10 lg:mt-24">
|
<div className="flex flex-col lg:flex-row lg:justify-between gap-4 mt-10 lg:mt-24">
|
||||||
<div className="flex flex-row gap-6">
|
<div className="flex flex-row gap-6">
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import {
|
||||||
formatMonthString,
|
formatMonthString,
|
||||||
formatTextToHtmlTag,
|
formatTextToHtmlTag,
|
||||||
} from "@/utils/global";
|
} from "@/utils/global";
|
||||||
import Image from "next/image";
|
|
||||||
import {
|
import {
|
||||||
CalendarIcon,
|
CalendarIcon,
|
||||||
ChevronLeftIcon,
|
ChevronLeftIcon,
|
||||||
|
|
@ -26,6 +25,7 @@ import { useEffect, useState } from "react";
|
||||||
import { image } from "@heroui/theme";
|
import { image } from "@heroui/theme";
|
||||||
import Cookies from "js-cookie";
|
import Cookies from "js-cookie";
|
||||||
import { saveActivity } from "@/services/activity-log";
|
import { saveActivity } from "@/services/activity-log";
|
||||||
|
import { Image } from "@heroui/react";
|
||||||
|
|
||||||
const token = Cookies.get("access_token");
|
const token = Cookies.get("access_token");
|
||||||
const uid = Cookies.get("uie");
|
const uid = Cookies.get("uie");
|
||||||
|
|
@ -155,8 +155,6 @@ export default function DetailNews(props: { data: any; listArticle: any }) {
|
||||||
<div className="flex justify-center my-2 lg:my-5">
|
<div className="flex justify-center my-2 lg:my-5">
|
||||||
{data?.files?.length > 0 && (
|
{data?.files?.length > 0 && (
|
||||||
<Image
|
<Image
|
||||||
width={1440}
|
|
||||||
height={1080}
|
|
||||||
alt="Main Image"
|
alt="Main Image"
|
||||||
src={data?.files[imageNow]?.file_url}
|
src={data?.files[imageNow]?.file_url}
|
||||||
className="object-cover w-[100%] rounded-md"
|
className="object-cover w-[100%] rounded-md"
|
||||||
|
|
@ -172,9 +170,7 @@ export default function DetailNews(props: { data: any; listArticle: any }) {
|
||||||
className="cursor-pointer"
|
className="cursor-pointer"
|
||||||
>
|
>
|
||||||
<Image
|
<Image
|
||||||
width={480}
|
alt="Sub Image"
|
||||||
height={480}
|
|
||||||
alt="NextUI hero Image"
|
|
||||||
src={file?.file_url}
|
src={file?.file_url}
|
||||||
className="object-cover w-[75px] lg:w-[150px] h-[50px] lg:h-[100px] rounded-md"
|
className="object-cover w-[75px] lg:w-[150px] h-[50px] lg:h-[100px] rounded-md"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue