import React from "react"; import { Box, Button, Typography } from "@mui/material"; import { styled } from "@mui/material/styles"; import axios, { AxiosResponse } from "axios"; import { FileUpload } from "@mui/icons-material"; 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 UploadImage(props: { className?: string; onUpload?: () => void; onSuccess: (res: AxiosResponse) => void; onError: (err: any) => void; }) { const { className, onUpload, onSuccess, onError } = props; return (
); }