"use client";
import { useRef } from "react";
import { Button } from "@mui/material";
import ProfileP from "@/components/icons/ProfileP";
import ArrowLeftPU from "@/components/icons/ArrowLeftPU";
import { uploadImage } from "@/helper";
import Image from "next/image";
function UploadFile({ image, setImage }) {
const fileRef = useRef();
const openInput = () => fileRef.current.click();
const handleChange = async (event) => {
const result = await uploadImage(event);
setImage(result);
};
return (
<>
{image && image.blob ? (