Skip to content
Snippets Groups Projects
Commit 52fa4db1 authored by James D'Alton's avatar James D'Alton
Browse files

Removed home page

parent 01c060a1
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ import ProtectedRoute from "./Components/ProtectedRoute.react";
// Presentational Components
import AppHeader from "./Components/AppHeader.react";
import HomePage from "./Components/HomePage.react";
// import HomePage from "./Components/HomePage.react";
import Login from "./Components/Login.react";
import UserDashboard from "./Components/UserDashboard.react";
import Signup from "./Components/Signup.react";
......@@ -21,12 +21,30 @@ function App(props) {
<div className="rootApp" style={{ maxWidth: 1200, margin: '16px auto auto' }}>
<AppHeader isAuthenticated={isAuthenticated} isVerifying={isVerifying} />
<Switch>
<ProtectedRoute exact path='/userhome' component={()=>{return (<UserDashboard user={user ? user : false} />)}} isAuthenticated={isAuthenticated} isVerifying={isVerifying} ></ProtectedRoute>
<ProtectedRoute exact path='/mysubmissions' component={()=>{return (<SubsScreen mySubs={true} user={user ? user : false} />)}} isAuthenticated={isAuthenticated} isVerifying={isVerifying} ></ProtectedRoute>
<ProtectedRoute exact path='/partnerssubmissions' component={()=>{return (<SubsScreen mySubs={false} user={user ? user : false} />)}} isAuthenticated={isAuthenticated} isVerifying={isVerifying} ></ProtectedRoute>
<ProtectedRoute
exact path='/'
component={()=>{return (<UserDashboard user={user ? user : false} />)}}
isAuthenticated={isAuthenticated}
isVerifying={isVerifying} >
</ProtectedRoute>
<ProtectedRoute
exact path='/mysubmissions'
component={()=>{return (<SubsScreen mySubs={true} user={user ? user : false} />)}}
isAuthenticated={isAuthenticated}
isVerifying={isVerifying} >
</ProtectedRoute>
<ProtectedRoute
exact path='/partnerssubmissions'
component={()=>{return (<SubsScreen mySubs={false} user={user ? user : false} />)}}
isAuthenticated={isAuthenticated}
isVerifying={isVerifying} >
</ProtectedRoute>
<Route path="/login" component={Login} />
<Route path="/signup" component={Signup} />
<Route path="/" component={()=><HomePage isAuthenticated={isAuthenticated} />} />
</Switch>
</div>
);
......
......@@ -91,7 +91,7 @@ const AppHeader = (props) => {
let { user } = props;
let { isAdmin } = props;
const [open, setOpen] = React.useState(true);
const [open, setOpen] = React.useState(false);
const [openModal, setOpenModal] = React.useState(false);
const toggleModalState = () => {
......@@ -114,7 +114,7 @@ const AppHeader = (props) => {
<MenuIcon /> <span style={{marginLeft: 8, fontSize: 16}}> Menu </span>
</IconButton>
<div style={{margin: "auto", position: 'relative', left: isAuthenticated ? 10 : 56 }}>
<Link to={ isAuthenticated ? '/userhome' : '/'} style={{textDecoration: 'none', color: 'white', cursor: 'pointer'}}>
<Link to={ isAuthenticated ? '/' : '/'} style={{textDecoration: 'none', color: 'white', cursor: 'pointer'}}>
<Typography variant="h6" className={classes.title}>
CompForge
</Typography>
......
......@@ -88,7 +88,7 @@ const Login = (props) => {
}
if (isAuthenticated) {
return <Redirect to="/userhome" />;
return <Redirect to="/" />;
}
return (<Container component="main" style={{marginBottom: 100, paddingLeft: 0, paddingRight: 0}} maxWidth="xs">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment