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

@ -503,7 +503,7 @@ class Discover extends React.Component{
<div className="view discover-view">
<div className="intro">
<Parallax image="assets/backgrounds/discover.jpg" theme={this.props.theme} />
<Parallax image="assets/backgrounds/discover.jpg" theme={this.props.theme} disabled={this.props.disable_parallax} />
<div className="liner">
<h1>Explore new music</h1>
@ -547,6 +547,7 @@ class Discover extends React.Component{
const mapStateToProps = (state, ownProps) => {
return {
disable_parallax: state.ui.disable_parallax,
theme: state.ui.theme,
albums: state.core.albums,
artists: state.core.artists,