import { useRef, useState } from 'react' import AvatarEditor from 'react-avatar-editor' import Button from 'react-bootstrap/Button' import BootstrapForm from 'react-bootstrap/Form' import Upload from './upload' import EditImage from '../svgs/image-edit-fill.svg' import Moon from '../svgs/moon-fill.svg' import { useShowModal } from './modal' export default function Avatar ({ onSuccess }) { const [uploading, setUploading] = useState() const ref = useRef() const [scale, setScale] = useState(1) const showModal = useShowModal() const Body = ({ onClose, file, upload }) => { return (