QC Investasi
# fix Tampilan admin investasi Tampilan admin donasi ## No issuee
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
import { Header, Group, ActionIcon, Text, Title } from "@mantine/core";
|
||||
import { IconArrowLeft, IconChevronLeft } from "@tabler/icons-react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
|
||||
export default function ComponentGlobal_HeaderTamplate({
|
||||
route,
|
||||
@@ -16,13 +17,18 @@ export default function ComponentGlobal_HeaderTamplate({
|
||||
icon?: any;
|
||||
}) {
|
||||
const router = useRouter();
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [isRightLoading, setRightLoading] = useState(false);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Header height={50} sx={{ borderStyle: "none" }}>
|
||||
<Group h={50} position="apart" px={"md"}>
|
||||
<ActionIcon
|
||||
loading={isLoading ? true : false}
|
||||
variant="transparent"
|
||||
onClick={() => {
|
||||
setIsLoading(true);
|
||||
if (route === null || route === undefined) {
|
||||
return router.back();
|
||||
} else {
|
||||
@@ -39,8 +45,12 @@ export default function ComponentGlobal_HeaderTamplate({
|
||||
} else {
|
||||
return (
|
||||
<ActionIcon
|
||||
loading={isRightLoading ? true : false}
|
||||
variant="transparent"
|
||||
onClick={() => router.push(route2)}
|
||||
onClick={() => {
|
||||
setRightLoading(true);
|
||||
router.push(route2);
|
||||
}}
|
||||
>
|
||||
{icon}
|
||||
</ActionIcon>
|
||||
|
||||
18
src/app_modules/component_global/variabel_global.ts
Normal file
18
src/app_modules/component_global/variabel_global.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { ComponentGlobal_NotifikasiPeringatan } from "./notif_global/notifikasi_peringatan";
|
||||
|
||||
/**
|
||||
* @returns nilai maksimal untuk upload file di semua module
|
||||
*/
|
||||
export let maksimalUploadFile = 2000000;
|
||||
export const ComponentGlobal_WarningMaxUpload = ({
|
||||
text,
|
||||
time,
|
||||
}: {
|
||||
text?: string;
|
||||
time?: number;
|
||||
}) => {
|
||||
ComponentGlobal_NotifikasiPeringatan(
|
||||
text ? text : "Maaf, Ukuran file terlalu besar, maximum 2mb",
|
||||
time ? time : 3000
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user