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"; ...@@ -7,7 +7,7 @@ import ProtectedRoute from "./Components/ProtectedRoute.react";
// Presentational Components // Presentational Components
import AppHeader from "./Components/AppHeader.react"; 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 Login from "./Components/Login.react";
import UserDashboard from "./Components/UserDashboard.react"; import UserDashboard from "./Components/UserDashboard.react";
import Signup from "./Components/Signup.react"; import Signup from "./Components/Signup.react";
...@@ -21,12 +21,30 @@ function App(props) { ...@@ -21,12 +21,30 @@ function App(props) {
<div className="rootApp" style={{ maxWidth: 1200, margin: '16px auto auto' }}> <div className="rootApp" style={{ maxWidth: 1200, margin: '16px auto auto' }}>
<AppHeader isAuthenticated={isAuthenticated} isVerifying={isVerifying} /> <AppHeader isAuthenticated={isAuthenticated} isVerifying={isVerifying} />
<Switch> <Switch>
<ProtectedRoute exact path='/userhome' component={()=>{return (<UserDashboard user={user ? user : false} />)}} isAuthenticated={isAuthenticated} isVerifying={isVerifying} ></ProtectedRoute> <ProtectedRoute
<ProtectedRoute exact path='/mysubmissions' component={()=>{return (<SubsScreen mySubs={true} user={user ? user : false} />)}} isAuthenticated={isAuthenticated} isVerifying={isVerifying} ></ProtectedRoute> exact path='/'
<ProtectedRoute exact path='/partnerssubmissions' component={()=>{return (<SubsScreen mySubs={false} user={user ? user : false} />)}} isAuthenticated={isAuthenticated} isVerifying={isVerifying} ></ProtectedRoute> 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="/login" component={Login} />
<Route path="/signup" component={Signup} /> <Route path="/signup" component={Signup} />
<Route path="/" component={()=><HomePage isAuthenticated={isAuthenticated} />} />
</Switch> </Switch>
</div> </div>
); );
......
...@@ -91,7 +91,7 @@ const AppHeader = (props) => { ...@@ -91,7 +91,7 @@ const AppHeader = (props) => {
let { user } = props; let { user } = props;
let { isAdmin } = props; let { isAdmin } = props;
const [open, setOpen] = React.useState(true); const [open, setOpen] = React.useState(false);
const [openModal, setOpenModal] = React.useState(false); const [openModal, setOpenModal] = React.useState(false);
const toggleModalState = () => { const toggleModalState = () => {
...@@ -114,7 +114,7 @@ const AppHeader = (props) => { ...@@ -114,7 +114,7 @@ const AppHeader = (props) => {
<MenuIcon /> <span style={{marginLeft: 8, fontSize: 16}}> Menu </span> <MenuIcon /> <span style={{marginLeft: 8, fontSize: 16}}> Menu </span>
</IconButton> </IconButton>
<div style={{margin: "auto", position: 'relative', left: isAuthenticated ? 10 : 56 }}> <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}> <Typography variant="h6" className={classes.title}>
CompForge CompForge
</Typography> </Typography>
...@@ -129,8 +129,8 @@ const AppHeader = (props) => { ...@@ -129,8 +129,8 @@ const AppHeader = (props) => {
</Link>} </Link>}
</Toolbar> </Toolbar>
</AppBar> </AppBar>
<AppMenu <AppMenu
toggleModalState={toggleModalState} toggleModalState={toggleModalState}
logout={logout} logout={logout}
isAdmin={isAuthenticated && isAdmin} isAdmin={isAuthenticated && isAdmin}
isAuthenticated={isAuthenticated} isAuthenticated={isAuthenticated}
......
...@@ -88,7 +88,7 @@ const Login = (props) => { ...@@ -88,7 +88,7 @@ const Login = (props) => {
} }
if (isAuthenticated) { if (isAuthenticated) {
return <Redirect to="/userhome" />; return <Redirect to="/" />;
} }
return (<Container component="main" style={{marginBottom: 100, paddingLeft: 0, paddingRight: 0}} maxWidth="xs"> 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.
Finish editing this message first!
Please register or to comment