Desc:
- Fitur crowdfunding
- Fitur Investasi
- Fitur tambah investasi
No issue
This commit is contained in:
2023-10-20 10:15:17 +08:00
parent 66fcad8634
commit bff07e84b1
47 changed files with 1172 additions and 49 deletions

View File

@@ -0,0 +1,19 @@
"use client";
import HeaderTamplate from "@/app_modules/component/header_tamplate";
import { AppShell } from "@mantine/core";
import React from "react";
export default function LayoutUploadGambarInvestasi({
children,
}: {
children: React.ReactNode;
}) {
return (
<>
<AppShell header={<HeaderTamplate title="Upload Gambar Investasi" />}>
{children}
</AppShell>
</>
);
}

View File

@@ -0,0 +1,39 @@
"use client";
import { Warna } from "@/app/lib/warna";
import {
AspectRatio,
Button,
Center,
Divider,
FileButton,
Group,
Image,
Paper,
Text,
Title,
} from "@mantine/core";
import { useState } from "react";
export default function UploadGambarInvestasi() {
const [img, setImg] = useState<any | null>();
return (
<>
<Group position="center">
<FileButton
onChange={async (files : any) => {
const buffer = URL.createObjectURL(
new Blob([new Uint8Array( await files.arrayBuffer())])
);
setImg(buffer);
}}
accept="image/png,image/jpeg"
>
{(props) => <Button {...props}>Upload image</Button>}
</FileButton>
</Group>
{img && <Image alt="" src={img}/>}
</>
);
}