mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
fix appmenu highlighting
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Redirect, Switch } from 'react-router';
|
||||
|
||||
import { PROJECT_PATH } from '../api';
|
||||
import { AuthenticatedRoute } from '../authentication';
|
||||
|
||||
import EMSESP from './EMSESP';
|
||||
@@ -12,17 +11,16 @@ class ProjectRouting extends Component {
|
||||
render() {
|
||||
return (
|
||||
<Switch>
|
||||
<AuthenticatedRoute exact path="/ems-esp/status" 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}/status`} />
|
||||
<Redirect to={`/ems-esp/status/`} />
|
||||
</Switch>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user