commit 80c4fff633a31a6cf0b5b45fe0c63c17de686c55
parent 1909f472cc2a2ef67e2dd0fcaec867bbdd73b3cd
Author: Massimo Siboldi <mdsiboldi@gmail.com>
Date: Thu, 8 Mar 2018 21:53:50 -0800
Make naming consistent
Diffstat:
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/App/index.js b/src/App/index.js
@@ -347,7 +347,7 @@ class App extends Component {
update={this.setBeats}
/>
<Adsr adsr={this.state.adsr} update={this.updateAdsr} />
- <HSlider value={this.props.volume} update={this.props.setVol} />
+ <HSlider value={this.props.volume} update={this.props.setVolume} />
</div>
<div class="wave-manager-container">
{tones}
diff --git a/src/index.js b/src/index.js
@@ -7,8 +7,8 @@ import { Provider, connect } from 'preact-redux';
import { store } from './store.js';
const ConnectedApp = connect(state => state, {
- setVol: (newVal) => ({type: 'SET_GLOBAL_VOL', value: newVal}),
- setBpm: (newVal) => ({type: 'SET_GLOBAL_BPM', value: newVal})
+ setBpm: (newVal) => ({type: 'SET_GLOBAL_BPM', value: newVal}),
+ setVolume: (newVal) => ({type: 'SET_GLOBAL_VOLUME', value: newVal}),
})(App);
const InformedApp = <Provider store={store}><ConnectedApp /></Provider>;
diff --git a/src/store.js b/src/store.js
@@ -8,7 +8,7 @@ const initialState = {
const reducer = (state, action) => {
let updates = {};
switch (action.type) {
- case 'SET_GLOBAL_VOL':
+ case 'SET_GLOBAL_VOLUME':
updates.volume = action.value;
break;
case 'SET_GLOBAL_BPM':