upd: donasi

Deskripsi:
- loading button tambah donasi
- loading button pada halaman crowd-main
- router path pada donasi-beranda

NO Issues
This commit is contained in:
amel
2024-12-12 15:53:44 +08:00
parent c2bb739b92
commit 180a10329e
4 changed files with 25 additions and 18 deletions

View File

@@ -40,11 +40,15 @@ export default function ComponentGlobal_CreateButton({
router.push(path); router.push(path);
}} }}
> >
{isLoading ? ( {/* PAKE LOADING */}
{/* {isLoading ? (
<Loader color={AccentColor.blue} size={25} /> <Loader color={AccentColor.blue} size={25} />
) : ( ) : (
<IconPencilPlus color="white" /> <IconPencilPlus color="white" />
)} )} */}
{/* GA PAKE LOADING */}
<IconPencilPlus color="white" />
</ActionIcon> </ActionIcon>
</> </>
); );

View File

@@ -74,11 +74,15 @@ export default function MainCrowd() {
</Grid.Col> </Grid.Col>
<Grid.Col span={2}> <Grid.Col span={2}>
<Stack h={"100%"} justify="center" align="center"> <Stack h={"100%"} justify="center" align="center">
{loadingInv ? ( {/* PAKE LOADING */}
{/* {loadingInv ? (
<ComponentGlobal_Loader /> <ComponentGlobal_Loader />
) : ( ) : (
<IconChevronRight /> <IconChevronRight />
)} )} */}
{/* GA PAKE LOADING */}
<IconChevronRight />
</Stack> </Stack>
</Grid.Col> </Grid.Col>
</Grid> </Grid>
@@ -114,11 +118,15 @@ export default function MainCrowd() {
</Grid.Col> </Grid.Col>
<Grid.Col span={2}> <Grid.Col span={2}>
<Stack h={"100%"} justify="center" align="center"> <Stack h={"100%"} justify="center" align="center">
{loadingDon ? ( {/* PAKE LOADING */}
{/* {loadingDon ? (
<ComponentGlobal_Loader /> <ComponentGlobal_Loader />
) : ( ) : (
<IconChevronRight /> <IconChevronRight />
)} )} */}
{/* GA PAKE LOADINGF */}
<IconChevronRight />
</Stack> </Stack>
</Grid.Col> </Grid.Col>
</Grid> </Grid>

View File

@@ -1,23 +1,21 @@
"use client"; "use client";
import { ComponentGlobal_CardLoadingOverlay, ComponentGlobal_CardStyles, ComponentGlobal_LoadImageCustom, } from "@/app_modules/_global/component"; import { RouterDonasi } from "@/app/lib/router_hipmi/router_donasi";
import { ComponentGlobal_CardStyles, ComponentGlobal_LoadImageCustom } from "@/app_modules/_global/component";
import { Grid, Progress, Stack, Text } from "@mantine/core"; import { Grid, Progress, Stack, Text } from "@mantine/core";
import { useRouter } from "next/navigation"; import { useRouter } from "next/navigation";
import { useState } from "react";
import ComponentDonasi_TampilanHitungMundur from "../tampilan_hitung_mundur"; import ComponentDonasi_TampilanHitungMundur from "../tampilan_hitung_mundur";
import TampilanRupiahDonasi from "../tampilan_rupiah"; import TampilanRupiahDonasi from "../tampilan_rupiah";
export default function ComponentDonasi_CardPublishNew({ data, path, }: { data: any; path: string; }) { export default function ComponentDonasi_CardPublishNew({ data }: { data: any; }) {
const router = useRouter(); const router = useRouter();
const [visible, setVisible] = useState(false);
const [donasiId, setDonasiId] = useState("");
return ( return (
<> <>
<ComponentGlobal_CardStyles <ComponentGlobal_CardStyles
onClickHandler={() => { onClickHandler={() => {
setVisible(true); // DELSOON
setDonasiId(data.id); console.log(RouterDonasi.detail_main + `${data.id}`)
router.push(path + `${data.id}`); router.push(RouterDonasi.detail_main + `${data.id}`)
}} }}
> >
<Stack> <Stack>

View File

@@ -121,10 +121,7 @@ export default function MainDonasiNew() {
}} }}
> >
{(item) => ( {(item) => (
<ComponentDonasi_CardPublishNew <ComponentDonasi_CardPublishNew data={item as any} />
data={item as any}
path={RouterDonasi.detail_main}
/>
)} )}
</ScrollOnly> </ScrollOnly>
) )