import { ArrowLeftIcon } from '@heroicons/react/outline' import React, { useState } from 'react' import { useWindowSize } from 'react-use' import Button from './components/Button' import FileSelect from './components/FileSelect' import Editor from './Editor' import { resizeImageFile } from './utils' function App() { const [file, setFile] = useState() const windowSize = useWindowSize() return (
{file ? ( ) : ( <> )}
{file ? ( ) : ( <>

Image inpainting powered by 🦙 LaMa

{ const { file: resizedFile, resized, originalWidth, originalHeight, } = await resizeImageFile(f, 1024) setFile(resizedFile) }} />
)}
) } export default App