Fix: admin map
Deskripsi: - Fix map image ## No Issue
This commit is contained in:
@@ -56,7 +56,6 @@ export function Admin_ComponentLoadImageLandscape({
|
||||
<Image
|
||||
onClick={() => {
|
||||
setLoading(true);
|
||||
|
||||
router.push(RouterAdminGlobal.preview_image({ id: fileId }), {
|
||||
scroll: false,
|
||||
});
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
"use client";
|
||||
|
||||
import { Box, Center, Image, ScrollArea, Skeleton, Stack, Text } from "@mantine/core";
|
||||
import AdminGlobal_ComponentBackButton from "./back_button";
|
||||
import { APIs, pathAssetImage } from "@/app/lib";
|
||||
import { Box, Center, Image, ScrollArea, Skeleton, Stack } from "@mantine/core";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import AdminGlobal_ComponentBackButton from "../back_button";
|
||||
|
||||
export function Admin_UiImagePreview({ fileId }: { fileId: string }) {
|
||||
const router = useRouter();
|
||||
export function Admin_ComponentPreviewImageAdmin({
|
||||
fileId,
|
||||
}: {
|
||||
fileId: string;
|
||||
}) {
|
||||
const [isImage, setIsImage] = useState<boolean | null>(null);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
|
||||
const url = APIs.GET({ fileId: fileId });
|
||||
|
||||
@@ -29,14 +30,16 @@ export function Admin_UiImagePreview({ fileId }: { fileId: string }) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Stack>
|
||||
<AdminGlobal_ComponentBackButton />
|
||||
|
||||
<Box style={{ zIndex: 0 }} h={"90vh"} pos={"static"} px={"lg"}>
|
||||
{isImage === null ? (
|
||||
<Skeleton height={200} radius={"sm"} />
|
||||
<Center>
|
||||
<Skeleton height={300} w={200} radius={"sm"} />
|
||||
</Center>
|
||||
) : isImage ? (
|
||||
<ScrollArea h={"100%"}>
|
||||
<Center>
|
||||
@@ -1,7 +1,5 @@
|
||||
import { Admin_ComponentLoadImageLandscape } from "./_component/comp_admin_load_image";
|
||||
import { Admin_ComponentSkeletonNavbar } from "./_component/comp_admin_skeleton_navbar";
|
||||
import { Admin_UiImagePreview } from "./_ui/ui_admin_image_preview";
|
||||
|
||||
export { Admin_ComponentLoadImageLandscape };
|
||||
export { Admin_UiImagePreview };
|
||||
export { Admin_ComponentSkeletonNavbar };
|
||||
export { Admin_ComponentLoadImageLandscape, Admin_ComponentSkeletonNavbar };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user