Minor interface tidyups:
Factor out app name Tidy index.js
This commit is contained in:
parent
e63a8c4b75
commit
7f6fc0facc
1
interface/.env
Normal file
1
interface/.env
Normal file
@ -0,0 +1 @@
|
|||||||
|
REACT_APP_NAME=ESP8266 React
|
@ -22,6 +22,8 @@ import SystemUpdateIcon from '@material-ui/icons/SystemUpdate';
|
|||||||
import AccessTimeIcon from '@material-ui/icons/AccessTime';
|
import AccessTimeIcon from '@material-ui/icons/AccessTime';
|
||||||
import SettingsInputAntennaIcon from '@material-ui/icons/SettingsInputAntenna';
|
import SettingsInputAntennaIcon from '@material-ui/icons/SettingsInputAntenna';
|
||||||
|
|
||||||
|
import { APP_NAME } from '../constants/App';
|
||||||
|
|
||||||
const drawerWidth = 290;
|
const drawerWidth = 290;
|
||||||
|
|
||||||
const styles = theme => ({
|
const styles = theme => ({
|
||||||
@ -97,7 +99,7 @@ class MenuAppBar extends React.Component {
|
|||||||
<div>
|
<div>
|
||||||
<Toolbar>
|
<Toolbar>
|
||||||
<Typography variant="title" color="primary">
|
<Typography variant="title" color="primary">
|
||||||
ESP8266 React
|
{APP_NAME}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Divider absolute />
|
<Divider absolute />
|
||||||
</Toolbar>
|
</Toolbar>
|
||||||
|
@ -2,15 +2,12 @@ import React from 'react';
|
|||||||
import { render } from 'react-dom';
|
import { render } from 'react-dom';
|
||||||
|
|
||||||
import history from './history';
|
import history from './history';
|
||||||
import { Router, Route, Redirect, Switch } from 'react-router';
|
import { Router } from 'react-router';
|
||||||
|
|
||||||
import App from './App';
|
import App from './App';
|
||||||
|
|
||||||
render((
|
render((
|
||||||
<Router history={history}>
|
<Router history={history}>
|
||||||
<Switch>
|
<App/>
|
||||||
<Redirect exact from='/' to='/home'/>
|
|
||||||
<Route path="/" component={App} />
|
|
||||||
</Switch>
|
|
||||||
</Router>
|
</Router>
|
||||||
), document.getElementById("root"))
|
), document.getElementById("root"))
|
||||||
|
Loading…
Reference in New Issue
Block a user