fix:next image

This commit is contained in:
Rama Priyanto 2025-04-17 16:25:59 +07:00
parent 7f3a94b70f
commit 4113076644
14 changed files with 1514 additions and 2648 deletions

View File

@ -22,9 +22,9 @@ import { useRouter } from "next/navigation";
import Swal from "sweetalert2";
import withReactContent from "sweetalert2-react-content";
import { saveActivity } from "@/service/activity-log";
import { Image } from "@heroui/react";
import { InputOtp } from "@heroui/input-otp";
import PasswordChecklist from "react-password-checklist";
import { Image } from "@heroui/react";
export default function Login() {
const router = useRouter();
@ -293,7 +293,9 @@ export default function Login() {
<Image
src="/headerbanner1.png"
alt="login-image"
className="w-full h-screen rounded-none object-cover"
className="!w-full !h-screen rounded-none object-cover"
width={1980}
height={1080}
/>
<Link href="/" className="absolute left-5 top-5">
<Image

View File

@ -4,7 +4,6 @@ import {
Card,
CardFooter,
CircularProgress,
Image,
ScrollShadow,
} from "@heroui/react";
import { ChevronLeftIcon, ChevronRightIcon, EyeIcon } from "../icons";
@ -22,6 +21,7 @@ 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<any>([]);
@ -122,6 +122,8 @@ 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"
/>
@ -248,6 +250,8 @@ export default function HeaderNews() {
>
<Image
alt="headernews"
width={480}
height={480}
src={
newsItem?.thumbnailUrl == ""
? "/no-image.jpg"

View File

@ -3,7 +3,6 @@ import {
Card,
CardBody,
CardFooter,
Image,
Spinner,
Tab,
Tabs,
@ -25,6 +24,7 @@ import {
import { convertDateFormatNoTime, textEllipsis } from "@/utils/global";
import PolriTvWidget from "../ui/social-media/polri-tv";
import { useTranslations } from "next-intl";
import Image from "next/image";
export default function MedolUpdate() {
const [selectedTab, setSelectedTab] = useState<any>("mediahub");
@ -181,8 +181,8 @@ export default function MedolUpdate() {
>
<CardBody className="overflow-visible p-0">
<Image
radius="lg"
width="300%"
width={480}
height={480}
alt="tes"
className="object-cover !h-[20vh]"
src={newsItem.thumbnailLink}
@ -270,8 +270,8 @@ export default function MedolUpdate() {
>
<CardBody className="overflow-visible p-0">
<Image
radius="lg"
width="300%"
width={480}
height={480}
alt="tes"
className="object-cover !h-[20vh]"
src={newsItem?.image}
@ -362,8 +362,8 @@ export default function MedolUpdate() {
>
<CardBody className="overflow-visible p-0">
<Image
radius="lg"
width="300%"
width={480}
height={480}
alt="tes"
className="object-cover !h-[20vh]"
src={newsItem?.thumbnail}

View File

@ -34,12 +34,12 @@ import {
PopoverContent,
Accordion,
AccordionItem,
Image,
} from "@heroui/react";
import storedLanguage from "@/store/language-store";
import { ThemeSwitch } from "../theme-switch";
import { siteConfig, SiteConfig } from "@/config/site";
import { getAdvertise } from "@/service/advertisement";
import Image from "next/image";
const images = [
"/landing-1.jpg",
@ -128,6 +128,8 @@ export default function BannerHumasNew() {
{withImage && (
<Image
alt="logo"
width={1960}
height={1080}
src={menu.img}
className="w-[45px] h-[45px]"
/>
@ -231,6 +233,8 @@ export default function BannerHumasNew() {
<Image
src={images[index % 4]}
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"
/>
</Link>
@ -248,7 +252,13 @@ export default function BannerHumasNew() {
OBYEKTIF - DIPERCAYA - PARTISIPASI
</p>
</div>
<Image src="/divhumas.png" alt="logo-humas" className="w-[200px]" />
<Image
src="/divhumas.png"
alt="logo-humas"
className="w-[200px]"
width={1960}
height={1080}
/>
</div>
<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">

View File

@ -5,7 +5,7 @@ import CategorySatker from "./CategorySatker";
import PolriApps from "./PolriApps";
import Link from "next/link";
import SuggestionsModal from "./suggestions";
import { Image } from "@heroui/react";
import Image from "next/image";
export default function DigitalServices() {
const [isPoldaOpen, setIsPoldaOpen] = useState(false);
@ -26,6 +26,8 @@ export default function DigitalServices() {
className="group shadow-lg rounded-lg w-full h-[200px] flex flex-col justify-center items-center hover:border-3 hover:border-red-600 cursor-pointer mx-auto transition duration-300 ease-in-out"
>
<Image
width={480}
height={480}
src="/indonesia-map.png"
alt="indonesia"
className="w-[100px] group-hover:scale-125 transition duration-300 ease-in-out"
@ -42,6 +44,8 @@ export default function DigitalServices() {
className="group shadow-lg rounded-lg w-full h-[200px] flex flex-col justify-center items-center hover:border-3 hover:border-red-600 cursor-pointer mx-auto transition duration-300 ease-in-out"
>
<Image
width={480}
height={480}
src="/satker.png"
alt="satker"
className="w-[100px] group-hover:scale-125 transition duration-300 ease-in-out"
@ -58,6 +62,8 @@ export default function DigitalServices() {
className="group shadow-lg rounded-lg w-full h-[200px] flex flex-col justify-center items-center hover:border-3 hover:border-red-600 cursor-pointer mx-auto transition duration-300 ease-in-out"
>
<Image
width={480}
height={480}
src="/presisi.png"
alt="presisi"
className="w-[100px] group-hover:scale-125 transition duration-300 ease-in-out"
@ -74,6 +80,8 @@ export default function DigitalServices() {
className="group shadow-lg rounded-lg w-full h-[200px] flex flex-col justify-center items-center hover:border-3 hover:border-red-600 cursor-pointer mx-auto transition duration-300 ease-in-out"
>
<Image
width={480}
height={480}
src="/kritik-saran.png"
alt="kritik-saran"
className="w-[100px] group-hover:scale-125 transition duration-300 ease-in-out"
@ -90,6 +98,8 @@ export default function DigitalServices() {
className="group shadow-lg rounded-lg w-full h-[200px] flex flex-col justify-center items-center hover:border-3 hover:border-red-600 cursor-pointer mx-auto transition duration-300 ease-in-out"
>
<Image
width={480}
height={480}
src="/survey.png"
alt="survey"
className="w-[100px] group-hover:scale-125 transition duration-300 ease-in-out"

3964
package-lock.json generated

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -2,8 +2,38 @@ import axiosInterceptorInstance from "@/services/http-config/axios-interceptor-i
import { getCsrfToken } from "../master-user";
import axiosBaseInstance from "./http-base-service";
import mediahubBaseInstance from "./mediahub-base-service";
import Cookies from "js-cookie";
function getCookie(name: string) {
const value = `; ${document.cookie}`;
console.log("val", value);
const parts: any = value.split(`; ${name}=`);
if (parts.length === 2) {
return parts.pop().split(";").shift();
}
return undefined;
}
function removeCookies() {
console.log("run");
Cookies.remove("csrf_");
Cookies.remove("session_id");
document.cookie = "csrf_=; Max-Age=0;path=/";
document.cookie = "session_id=; Max-Age=0;path=/";
}
export async function httpPost(pathUrl: any, headers: any, data?: any) {
// const aCookie = getCookie("session_id");
// if (aCookie === undefined) {
// console.log("kosong");
// } else {
// console.log("cookie ada", aCookie);
// }
// removeCookies();
// const csrfNow = Cookies.get("csrf_");
// const sessionNow = Cookies.get("session_id");
// console.log("now", csrfNow, sessionNow);
const resCsrf = await getCsrfToken();
const csrfToken = resCsrf?.data?.csrf_token;

12
vendor/ckeditor5/node_modules/.bin/tsc generated vendored Normal file
View File

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@"
else
exec node "$basedir/../typescript/bin/tsc" "$@"
fi

17
vendor/ckeditor5/node_modules/.bin/tsc.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\typescript\bin\tsc" %*

28
vendor/ckeditor5/node_modules/.bin/tsc.ps1 generated vendored Normal file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../typescript/bin/tsc" $args
} else {
& "$basedir/node$exe" "$basedir/../typescript/bin/tsc" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../typescript/bin/tsc" $args
} else {
& "node$exe" "$basedir/../typescript/bin/tsc" $args
}
$ret=$LASTEXITCODE
}
exit $ret

12
vendor/ckeditor5/node_modules/.bin/tsserver generated vendored Normal file
View File

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@"
else
exec node "$basedir/../typescript/bin/tsserver" "$@"
fi

17
vendor/ckeditor5/node_modules/.bin/tsserver.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\typescript\bin\tsserver" %*

28
vendor/ckeditor5/node_modules/.bin/tsserver.ps1 generated vendored Normal file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../typescript/bin/tsserver" $args
} else {
& "$basedir/node$exe" "$basedir/../typescript/bin/tsserver" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../typescript/bin/tsserver" $args
} else {
& "node$exe" "$basedir/../typescript/bin/tsserver" $args
}
$ret=$LASTEXITCODE
}
exit $ret