mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
initial commit
This commit is contained in:
33
interface/src/project/ProjectRouting.tsx
Normal file
33
interface/src/project/ProjectRouting.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Redirect, Switch } from 'react-router';
|
||||
|
||||
import { PROJECT_PATH } from '../api';
|
||||
import { AuthenticatedRoute } from '../authentication';
|
||||
|
||||
import EMSESP from './EMSESP';
|
||||
|
||||
class ProjectRouting extends Component {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Switch>
|
||||
{
|
||||
/*
|
||||
* Add your project page routing below.
|
||||
*/
|
||||
}
|
||||
<AuthenticatedRoute exact path={`/${PROJECT_PATH}/*`} 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}/`} />
|
||||
</Switch>
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default ProjectRouting;
|
||||
Reference in New Issue
Block a user