Parallax disabling for low-powered devices

This commit is contained in:
James Barnsley
2018-09-17 08:18:07 +12:00
parent cbdd2c4ad3
commit b5111b1840
17 changed files with 204 additions and 123 deletions

View File

@ -90,7 +90,7 @@ class User extends React.Component{
return (
<div className="view user-view">
<div className="intro">
<Parallax image={image} theme={this.props.theme} />
<Parallax image={image} theme={this.props.theme} disabled={this.props.disable_parallax} />
<div className="liner">
<h1>{user.name}</h1>
<h2>
@ -127,6 +127,7 @@ const mapStateToProps = (state, ownProps) => {
return {
me: state.spotify.me,
theme: state.ui.theme,
disable_parallax: state.ui.disable_parallax,
load_queue: state.ui.load_queue,
spotify_authorized: state.spotify.authorization,
playlists: state.core.playlists,