import React from "react"; import { Box, Button, Typography } from "@mui/material"; import { styled } from "@mui/material/styles"; import { FileUpload } from "@mui/icons-material"; import { api } from "../../lib/api"; import { OK } from "@metahkg/api"; const Input = styled("input")({ display: "none", }); /** * It's a form that uploads an image to the server * @returns A form with a file input. */ export default function UploadAvatar(props: { onUpload?: () => void; onSuccess: (res: OK) => void; onError: (err: any) => void; }) { const { onUpload, onSuccess, onError } = props; return (
); }