"use client"; import { Warna } from "@/app/lib/warna"; import { AspectRatio, Button, Center, CopyButton, FileButton, Grid, Group, Image, Text, } from "@mantine/core"; import { useShallowEffect } from "@mantine/hooks"; import { IconCamera } from "@tabler/icons-react"; import { useRouter } from "next/navigation"; import { useState } from "react"; import toast from "react-simple-toasts"; export default function UploadBuktiTransferInvestasi() { const router = useRouter(); const [fl, setFl] = useState(null); const [img, setImg] = useState(null); const [total, setTotal] = useState(null); const [bank, setBank] = useState(null); useShallowEffect(() => { if (typeof window !== undefined) { const totalHarga = localStorage.getItem("total_harga"); const pilihBank = localStorage.getItem("bank") setTotal(totalHarga); setBank(pilihBank) } }, []); return ( <> {/* Nama Rekening */} Nama Rekening Xendit {/* Nomor rekening */} Nomor Rekening {bank} {/* {({ copied, copy }) => ( )} */} {/* Total Bayar */} Total Bayar Rp. {total} {/* Upload */} { const buffer = URL.createObjectURL( new Blob([new Uint8Array(await files.arrayBuffer())]) ); setImg(buffer); setFl(files); }} accept="image/png,image/jpeg" > {(props) => ( )} {img ? ( ) : ( )} {/*
{img === null ? ( ) : ( )}
*/} ); }