diff --git a/src/App.tsx b/src/App.tsx index 4a181b8..3599e63 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -82,7 +82,6 @@ function App (): JSX.Element { const [, setPicturesInfo] = useState([]) const content: JSX.Element = <> - // eslint-disable-next-line @typescript-eslint/no-unused-vars const onImageUploadSubmit = (files: File[]): void => { setImageUploads(files) history.push(globalInfoPath) @@ -104,6 +103,28 @@ function App (): JSX.Element { const isPerPictureInfo = location.pathname === perPictureInfoPath + const routes = <> + + + + + + {imageUploads.length === 0 ? : } + + + {(() => { + if (imageUploads.length === 0) return + if (globalInfo === null) return + if (modalRef.current === null) return <> + return + })() + } + + + + + + return (
@@ -111,27 +132,7 @@ function App (): JSX.Element { {!isPerPictureInfo && }
{content} - - - - - - {imageUploads.length === 0 ? : } - - - { - imageUploads.length === 0 - ? - : globalInfo === null - ? - : modalRef.current === null - ? <> - : - } - - - - + {routes}
)