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 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>
|
||||
|
@ -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"))
|
||||
|
Loading…
Reference in New Issue
Block a user