Sidebar hide for mobile when navigation occurs
This commit is contained in:
@ -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 )
|
||||||
|
|||||||
@ -289,7 +289,7 @@ class Settings extends React.Component{
|
|||||||
<FontAwesome name="github" /> GitHub
|
<FontAwesome name="github" /> GitHub
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<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>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user