added dashboard and settings pages to web

This commit is contained in:
proddy
2020-07-16 22:34:40 +02:00
parent cdd7e79d0b
commit 70b8a43afc
3 changed files with 18 additions and 19 deletions

View File

@@ -5,25 +5,24 @@ import { PROJECT_PATH } from '../api';
import { AuthenticatedRoute } from '../authentication';
import EMSESP from './EMSESP';
import EMSESPSettings from './EMSESPSettings';
class ProjectRouting extends Component {
render() {
return (
<Switch>
{
/*
* Add your project page routing below.
*/
}
<AuthenticatedRoute exact path={`/${PROJECT_PATH}/*`} component={EMSESP} />
<AuthenticatedRoute exact path="/ems-esp/status" component={EMSESP} />
<AuthenticatedRoute exact path="/ems-esp/settings" component={EMSESPSettings} />
<AuthenticatedRoute exact path="/ems-esp/*" component={EMSESP} />
{
/*
* The redirect below caters for the default project route and redirecting invalid paths.
* The "to" property must match one of the routes above for this to work correctly.
*/
}
<Redirect to={`/${PROJECT_PATH}/`} />
<Redirect to={`/${PROJECT_PATH}/status`} />
</Switch>
)
}