This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
outline/frontend/stores/ErrorsStore.js

19 lines
336 B
JavaScript

// @flow
import { observable, action } from 'mobx';
class UiStore {
@observable errors = observable.array([]);
/* Actions */
@action add = (errorMessage: string): void => {
this.errors.push(errorMessage);
};
@action remove = (index: number): void => {
this.errors.splice(index, 1);
};
}
export default UiStore;