import React, {useContext, useEffect} from 'react'; import Navbar from "./Navbar"; import {AuthContext} from "../App"; import FileUploadForm from "./FileUploadForm"; import FileManualForm from "./FileManualForm"; const background = require('../assets/wave.png') function Upload(props) { const {authState} = useContext(AuthContext) useEffect(() => { if (!authState.loggedIn) props.history.push("/login?return=upload") }, [authState.loggedIn, props.history]) return (