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