Files
pybricks-code/src/fileStorage/reducers.ts
T
David Lechner c6cf0608f4 explorer: move files state from fileStorage
This state should be exclusivly used to for displaying files in the
explorer, so the state should be in the explorer branch of the
reducer tree.
2022-04-04 18:59:13 -05:00

16 lines
403 B
TypeScript

// SPDX-License-Identifier: MIT
// Copyright (c) 2022 The Pybricks Authors
import { Reducer, combineReducers } from 'redux';
import { fileStorageDidInitialize } from './actions';
const isInitialized: Reducer<boolean> = (state = false, action) => {
if (fileStorageDidInitialize.matches(action)) {
return true;
}
return state;
};
export default combineReducers({ isInitialized });