From b11b6b916bad73e8ba837e251817db92f7eefafb Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Fri, 22 Jul 2016 08:01:01 -0700 Subject: [PATCH] Minor alignment refactor --- js/Volume.jsx | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/js/Volume.jsx b/js/Volume.jsx index 15c7144f..afdc4d05 100644 --- a/js/Volume.jsx +++ b/js/Volume.jsx @@ -12,19 +12,28 @@ class Volume extends React.Component { } setVolume(e) { - this.props.dispatch({type: 'SET_VOLUME', volume: e.target.value}); + this.props.dispatch({ + type: 'SET_VOLUME', + volume: e.target.value + }); } showMarquee() { - this.props.dispatch({type: 'SHOW_MARQUEE_REGISTER', register: 'volume'}); + this.props.dispatch({ + type: 'SHOW_MARQUEE_REGISTER', + register: 'volume' + }); } hideMarquee() { - this.props.dispatch({type: 'SHOW_MARQUEE_REGISTER', register: 'songTitle'}); + this.props.dispatch({ + type: 'SHOW_MARQUEE_REGISTER', + register: 'songTitle' + }); } render() { - const volume = this.props.volume; + const {volume} = this.props; const percent = volume / 100; const sprite = Math.round(percent * 28); const offset = (sprite - 1) * 15;