Minor interface tidyups:

Factor out app name
Tidy index.js
This commit is contained in:
Rick Watson 2019-05-14 22:20:08 +01:00
parent e63a8c4b75
commit 7f6fc0facc
3 changed files with 6 additions and 6 deletions

1
interface/.env Normal file
View File

@ -0,0 +1 @@
REACT_APP_NAME=ESP8266 React

View File

@ -22,6 +22,8 @@ import SystemUpdateIcon from '@material-ui/icons/SystemUpdate';
import AccessTimeIcon from '@material-ui/icons/AccessTime';
import SettingsInputAntennaIcon from '@material-ui/icons/SettingsInputAntenna';
import { APP_NAME } from '../constants/App';
const drawerWidth = 290;
const styles = theme => ({
@ -97,7 +99,7 @@ class MenuAppBar extends React.Component {
<div>
<Toolbar>
<Typography variant="title" color="primary">
ESP8266 React
{APP_NAME}
</Typography>
<Divider absolute />
</Toolbar>

View File

@ -2,15 +2,12 @@ import React from 'react';
import { render } from 'react-dom';
import history from './history';
import { Router, Route, Redirect, Switch } from 'react-router';
import { Router } from 'react-router';
import App from './App';
render((
<Router history={history}>
<Switch>
<Redirect exact from='/' to='/home'/>
<Route path="/" component={App} />
</Switch>
<App/>
</Router>
), document.getElementById("root"))