diff --git a/src/app_modules/_global/ui/ui_header_tamplate.tsx b/src/app_modules/_global/ui/ui_header_tamplate.tsx
index 6126711c..6f6425e9 100644
--- a/src/app_modules/_global/ui/ui_header_tamplate.tsx
+++ b/src/app_modules/_global/ui/ui_header_tamplate.tsx
@@ -77,12 +77,21 @@ export default function UIGlobal_LayoutHeaderTamplate({
: router.push(routerLeft, { scroll: false });
}}
>
- {isLoading ? (
+ {/* PAKE LOADING SAAT KLIK BACK */}
+ {/* {isLoading ? (
) : iconLeft ? (
iconLeft
) : (
+ )} */}
+
+
+ {/* GA PAKE LOADING SAAT KLIK BACK */}
+ {iconLeft ? (
+ iconLeft
+ ) : (
+
)}
)}
diff --git a/src/app_modules/katalog/component/drawer_katalog_new.tsx b/src/app_modules/katalog/component/drawer_katalog_new.tsx
index 752a7643..ab0ef95c 100644
--- a/src/app_modules/katalog/component/drawer_katalog_new.tsx
+++ b/src/app_modules/katalog/component/drawer_katalog_new.tsx
@@ -108,14 +108,12 @@ export default function DrawerKatalogNew({
{listPage.map((e, i) => (
-
- {
- router.push(e.path, { scroll: false });
- }}
- >
+ {
+ router.push(e.path, { scroll: false });
+ }}
+ >
+
{e.icon}
diff --git a/src/app_modules/katalog/portofolio/component/button/comp_button_selanjutnya.tsx b/src/app_modules/katalog/portofolio/component/button/comp_button_selanjutnya.tsx
index c7e3fcd5..41c037b9 100644
--- a/src/app_modules/katalog/portofolio/component/button/comp_button_selanjutnya.tsx
+++ b/src/app_modules/katalog/portofolio/component/button/comp_button_selanjutnya.tsx
@@ -30,6 +30,7 @@ export function Portofolio_ComponentButtonSelanjutnya({
const [loading, setLoading] = useState(false);
async function onSubmit() {
+ setLoading(true);
const porto = {
namaBisnis: dataPortofolio.namaBisnis,
masterBidangBisnisId: dataPortofolio.masterBidangBisnisId,
@@ -56,7 +57,6 @@ export function Portofolio_ComponentButtonSelanjutnya({
fileId: uploadFileToStorage.data.id,
});
if (res.status === 201) {
- setLoading(true);
ComponentGlobal_NotifikasiBerhasil("Berhasil disimpan");
router.replace(RouterMap.create + res.id, { scroll: false });
} else {
diff --git a/src/app_modules/map/_component/button/comp_button_save_pin.tsx b/src/app_modules/map/_component/button/comp_button_save_pin.tsx
index 8af85a08..40a398d2 100644
--- a/src/app_modules/map/_component/button/comp_button_save_pin.tsx
+++ b/src/app_modules/map/_component/button/comp_button_save_pin.tsx
@@ -11,6 +11,7 @@ import { useRouter } from "next/navigation";
import { map_funCreatePin } from "../../fun/create/fun_create_pin";
import { DIRECTORY_ID } from "@/app/lib";
import { funGlobal_UploadToStorage } from "@/app_modules/_global/fun";
+import { useState } from "react";
export function ComponentMap_ButtonSavePin({
namePin,
@@ -26,7 +27,10 @@ export function ComponentMap_ButtonSavePin({
file: File;
}) {
const router = useRouter();
+ const [loading, setLoading] = useState(false)
+
async function onSavePin() {
+ setLoading(true)
const uploadFileToStorage = await funGlobal_UploadToStorage({
file: file,
dirId: DIRECTORY_ID.map_image,
@@ -49,15 +53,19 @@ export function ComponentMap_ButtonSavePin({
res.status === 200
? (ComponentGlobal_NotifikasiBerhasil(res.message), router.back())
: ComponentGlobal_NotifikasiGagal(res.message);
+
+ setLoading(false)
}
return (
<>