fix investasi
This commit is contained in:
@@ -5,11 +5,6 @@
|
||||
},
|
||||
"auditLog": "logs/backend/.31d2357fa2026a78b8cb786880c7c733460d7dbe-audit.json",
|
||||
"files": [
|
||||
{
|
||||
"date": 1739413125862,
|
||||
"name": "logs/backend/combined-2025-02-13.log",
|
||||
"hash": "51e5ed7dd711ae987cc602dcb0f736c750ff1d7cde4811768c710a70f1fef1f0"
|
||||
},
|
||||
{
|
||||
"date": 1739480222362,
|
||||
"name": "logs/backend/combined-2025-02-14.log",
|
||||
@@ -65,7 +60,7 @@
|
||||
"name": "logs/backend/combined-2025-02-27.log",
|
||||
"hash": "1ab05eadad383906bbd15885c155c83f8baf324dd121b076f8e8b7c18ba13a4b"
|
||||
},
|
||||
{
|
||||
{
|
||||
"date": 1740536165848,
|
||||
"name": "logs/backend/combined-2025-02-26.log",
|
||||
"hash": "428aedb3a3a248ad2c7069fcb8c6e0d669c23eae0dc3db08914886cce8d2cad9"
|
||||
@@ -74,6 +69,11 @@
|
||||
"date": 1740595120097,
|
||||
"name": "logs/backend/combined-2025-02-27.log",
|
||||
"hash": "f6884fe9b12faf0557662daa93ae1d32d64bb6b12714c8be494ce9396a55ae18"
|
||||
},
|
||||
{
|
||||
"date": 1740689395519,
|
||||
"name": "logs/backend/combined-2025-02-28.log",
|
||||
"hash": "223b3ce487edad5ccb0cc8b0334ddff566c397f6dd8efdce557d2e280292f879"
|
||||
}
|
||||
],
|
||||
"hashType": "sha256"
|
||||
|
||||
@@ -5,11 +5,6 @@
|
||||
},
|
||||
"auditLog": "logs/backend/.5d9a990e0c6075347623def466341a14f8ba4a12-audit.json",
|
||||
"files": [
|
||||
{
|
||||
"date": 1739413125859,
|
||||
"name": "logs/backend/error-2025-02-13.log",
|
||||
"hash": "f3c7e022a48b20a4f445135bd7df00f011051233c423f0129d519b295b105973"
|
||||
},
|
||||
{
|
||||
"date": 1739480222359,
|
||||
"name": "logs/backend/error-2025-02-14.log",
|
||||
@@ -69,6 +64,11 @@
|
||||
"date": 1740595120075,
|
||||
"name": "logs/backend/error-2025-02-27.log",
|
||||
"hash": "50f75c53936bf2ca5beb3f48fb5de09dde49fea0792fc3532055fab75aae408f"
|
||||
},
|
||||
{
|
||||
"date": 1740689395509,
|
||||
"name": "logs/backend/error-2025-02-28.log",
|
||||
"hash": "07c4769114d640620dca166d849b8cde36e103b1cf810e99bee07b89de03f817"
|
||||
}
|
||||
],
|
||||
"hashType": "sha256"
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import { Investasi_ViewBerandaNew } from "@/app_modules/investasi/_ui";
|
||||
|
||||
export default async function Page() {
|
||||
async function Page() {
|
||||
return (
|
||||
<>
|
||||
<Investasi_ViewBerandaNew />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default Page;
|
||||
|
||||
@@ -54,7 +54,6 @@ export default function MainCrowd() {
|
||||
// color: "gray",
|
||||
}}
|
||||
onClick={() => {
|
||||
setLoadingInv(true);
|
||||
router.push(RouterCrowd.investasi, { scroll: false });
|
||||
setChangeColor(0);
|
||||
}}
|
||||
@@ -94,13 +93,8 @@ export default function MainCrowd() {
|
||||
color: MainColor.white,
|
||||
}}
|
||||
onClick={() => {
|
||||
setLoadingDon(true);
|
||||
router.push(RouterCrowd.donasi, { scroll: false });
|
||||
setDonasiHotMenu(0);
|
||||
// ComponentGlobal_NotifikasiPeringatan(
|
||||
// "Sementara ini sedang maintenance",
|
||||
// 3000
|
||||
// );
|
||||
}}
|
||||
>
|
||||
<Grid>
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { AccentColor } from "@/app_modules/_global/color/color_pallet";
|
||||
import { Affix, Button, Center, rem } from "@mantine/core";
|
||||
import { useState } from "react";
|
||||
import { investasi_funGetAllPublish } from "../../fun/get_all_investasi";
|
||||
import { data } from "autoprefixer";
|
||||
import { apiGetAllInvestasi } from "../../_lib/api_interface";
|
||||
|
||||
export function Investasi_ComponentButtonUpdateBeranda({
|
||||
|
||||
@@ -15,6 +15,8 @@ import { Investasi_ComponentCardBerandaNew } from "../../_component/main/com_car
|
||||
import { apiGetAllInvestasi } from "../../_lib/api_interface";
|
||||
import { IDataInvestasiBursa } from "../../_lib/type_investasi";
|
||||
import SkeletonInvestasiBursa from "./skeleton_beranda";
|
||||
import frontendLogger from "@/util/frontendLogger";
|
||||
import { clientLogger } from "@/util/clientLogger";
|
||||
|
||||
export function Investasi_ViewBerandaNew() {
|
||||
const [data, setData] = useState<IDataInvestasiBursa[]>([]);
|
||||
@@ -33,6 +35,12 @@ export function Investasi_ViewBerandaNew() {
|
||||
}
|
||||
}, [isTriggerReload]);
|
||||
|
||||
useShallowEffect(() => {
|
||||
setIsTriggerReload(false);
|
||||
setIsShowUpdate(false);
|
||||
getDataInvestasi();
|
||||
}, []);
|
||||
|
||||
async function getDataInvestasi() {
|
||||
try {
|
||||
setLoading(true);
|
||||
@@ -47,11 +55,21 @@ export function Investasi_ViewBerandaNew() {
|
||||
}
|
||||
}
|
||||
|
||||
useShallowEffect(() => {
|
||||
setIsTriggerReload(false);
|
||||
setIsShowUpdate(false);
|
||||
getDataInvestasi();
|
||||
}, []);
|
||||
const handleMoreData = async () => {
|
||||
try {
|
||||
const pageNew = activePage + 1;
|
||||
const loadData = await apiGetAllInvestasi(`?cat=bursa&page=${pageNew}`);
|
||||
if (loadData.success) {
|
||||
setActivePage(pageNew);
|
||||
return loadData.data;
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
} catch (error) {
|
||||
clientLogger.error("Error ", error);
|
||||
return [];
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -80,15 +98,7 @@ export function Investasi_ViewBerandaNew() {
|
||||
)}
|
||||
data={data}
|
||||
setData={setData}
|
||||
moreData={async () => {
|
||||
const pageNew = activePage + 1;
|
||||
const loadData = await apiGetAllInvestasi(
|
||||
`?cat=bursa&page=${pageNew}`
|
||||
);
|
||||
setActivePage(pageNew);
|
||||
|
||||
return loadData.data as any;
|
||||
}}
|
||||
moreData={handleMoreData}
|
||||
>
|
||||
{(item) => <Investasi_ComponentCardBerandaNew data={item as any} />}
|
||||
</ScrollOnly>
|
||||
|
||||
Reference in New Issue
Block a user