import React, { useRef, useState } from 'react'; import Button from '@material-ui/core/Button'; import TextField from '@material-ui/core/TextField'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; import DialogContent from '@material-ui/core/DialogContent'; import DialogContentText from '@material-ui/core/DialogContentText'; import DialogTitle from '@material-ui/core/DialogTitle'; interface PropTypes { displayD: boolean; setDisplayD: (d: boolean) => void; callback: (a: string) => void; } const UploadImage: React.FC = ({ displayD, setDisplayD, callback }) => { const urlRef = useRef(null); const [url, setUrl] = useState(''); const handleClose = () => { setDisplayD(false); }; const update = () => { callback(urlRef.current?.value || ''); setDisplayD(false); }; const handleChange = (event:React.ChangeEvent) => { setUrl(event.target.value); }; return (
Upload an Image Unfortunetly we do not support uploading images yet. Please provide a valid URL to your image.
); }; export default UploadImage;