mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-15 11:04:49 +00:00
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.
16 lines
403 B
TypeScript
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 });
|