Sidebar hide for mobile when navigation occurs

This commit is contained in:
James Barnsley
2017-01-04 17:30:18 +13:00
parent 86526b234c
commit 2ee811b0c8
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
import React, { PropTypes } from 'react'; import React, { PropTypes } from 'react';
import ReactDOM from 'react-dom'; import ReactDOM from 'react-dom';
import { createStore, bindActionCreators } from 'redux' import { createStore, bindActionCreators } from 'redux'
import { browserHistory, Link } from 'react-router' import { hashHistory, Link } from 'react-router'
import { connect } from 'react-redux' import { connect } from 'react-redux'
import Sidebar from '../components/Sidebar' import Sidebar from '../components/Sidebar'
@ -42,7 +42,7 @@ class App extends React.Component{
if( this.props.spotify_authorized ) this.props.spotifyActions.getAllLibraryPlaylists(); if( this.props.spotify_authorized ) this.props.spotifyActions.getAllLibraryPlaylists();
// when we navigate to a new route // when we navigate to a new route
browserHistory.listen( location => { hashHistory.listen( location => {
// hide our sidebar // hide our sidebar
this.props.uiActions.toggleSidebar( false ) this.props.uiActions.toggleSidebar( false )

View File

@ -289,7 +289,7 @@ class Settings extends React.Component{
<FontAwesome name="github" />&nbsp;GitHub <FontAwesome name="github" />&nbsp;GitHub
</a> </a>
&nbsp;&nbsp; &nbsp;&nbsp;
<a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/" style={{display: 'inline-block', verticalAlign: 'middle'}}><img alt="Creative Commons License" src="https://i.creativecommons.org/l/by-nc/4.0/88x31.png" /></a> <a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/" target="_blank" style={{display: 'inline-block', verticalAlign: 'middle'}}><img alt="Creative Commons License" src="https://i.creativecommons.org/l/by-nc/4.0/88x31.png" /></a>
</div> </div>
</div> </div>