Fix the main navigation link.

master
Tom Hacohen 7 years ago
parent fe6490a098
commit 36cf88aaf2

@ -1,5 +1,5 @@
import * as React from 'react'; import * as React from 'react';
import { HashRouter } from 'react-router-dom'; import { HashRouter, NavLink } from 'react-router-dom';
import getMuiTheme from 'material-ui/styles/getMuiTheme'; import getMuiTheme from 'material-ui/styles/getMuiTheme';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import { amber500, amber700, lightBlue500, darkBlack, white } from 'material-ui/styles/colors'; import { amber500, amber700, lightBlue500, darkBlack, white } from 'material-ui/styles/colors';
@ -90,6 +90,7 @@ class App extends React.Component {
render() { render() {
return ( return (
<MuiThemeProvider muiTheme={muiTheme}> <MuiThemeProvider muiTheme={muiTheme}>
<HashRouter>
<div> <div>
<AppBar <AppBar
title={C.appName} title={C.appName}
@ -108,7 +109,12 @@ class App extends React.Component {
</div> </div>
</div> </div>
<List> <List>
<ListItem primaryText="Main" leftIcon={<ActionHome />} href={routeResolver.getRoute('home')} /> <NavLink
to={routeResolver.getRoute('home')}
exact={true}
>
<ListItem primaryText="Main" leftIcon={<ActionHome />} onClick={this.closeDrawer} />
</NavLink>
<Divider /> <Divider />
<Subheader>External Links</Subheader> <Subheader>External Links</Subheader>
<ListItem primaryText="Website" leftIcon={<ActionHome />} href={C.homePage} /> <ListItem primaryText="Website" leftIcon={<ActionHome />} href={C.homePage} />
@ -118,10 +124,9 @@ class App extends React.Component {
</List> </List>
</Drawer> </Drawer>
<HashRouter>
<EteSyncContext /> <EteSyncContext />
</HashRouter>
</div> </div>
</HashRouter>
</MuiThemeProvider> </MuiThemeProvider>
); );
} }

Loading…
Cancel
Save