mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-21 07:43:45 +02:00
Plop user data into the store when loading up the base component
This commit is contained in:
14
resources/scripts/state/models/flashes.ts
Normal file
14
resources/scripts/state/models/flashes.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user