mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-15 11:04:49 +00:00
23 lines
571 B
TypeScript
23 lines
571 B
TypeScript
// SPDX-License-Identifier: MIT
|
|
// Copyright (c) 2022 The Pybricks Authors
|
|
|
|
import { Reducer, combineReducers } from '@reduxjs/toolkit';
|
|
import { sponsorHideDialog, sponsorShowDialog } from './actions';
|
|
|
|
/** A list of open files in the order they should be displayed to the user. */
|
|
const showDialog: Reducer<boolean> = (state = false, action) => {
|
|
if (sponsorShowDialog.matches(action)) {
|
|
return true;
|
|
}
|
|
|
|
if (sponsorHideDialog.matches(action)) {
|
|
return false;
|
|
}
|
|
|
|
return state;
|
|
};
|
|
|
|
export default combineReducers({
|
|
showDialog,
|
|
});
|