mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-22 00:24:44 +02:00
15 lines
311 B
TypeScript
15 lines
311 B
TypeScript
import { action } from 'easy-peasy';
|
|
import { FlashState } from '@/state/types';
|
|
|
|
const flashes: FlashState = {
|
|
items: [],
|
|
addFlash: action((state, payload) => {
|
|
state.items.push(payload);
|
|
}),
|
|
clearFlashes: action(state => {
|
|
state.items = [];
|
|
}),
|
|
};
|
|
|
|
export default flashes;
|