mirror of
https://github.com/TrentSPalmer/fcc-challenges.git
synced 2024-10-31 21:38:46 -07:00
19 lines
432 B
JavaScript
19 lines
432 B
JavaScript
import { padsArray,initialIsMetronome } from "../Globals";
|
|
|
|
const getIsMetronomeStatuses = () => {
|
|
const metronomeStatuses = {};
|
|
padsArray.forEach(key => {
|
|
metronomeStatuses[key + 'isMetronome'] = sessionStorage.getItem(key + 'isMetronome');
|
|
});
|
|
return metronomeStatuses;
|
|
}
|
|
|
|
export default (state, action) => {
|
|
initialIsMetronome();
|
|
|
|
switch (action.type) {
|
|
default:
|
|
return getIsMetronomeStatuses();
|
|
}
|
|
};
|