mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-24 09:13:45 +02:00
Plop user data into the store when loading up the base component
This commit is contained in:
@@ -1,16 +1,11 @@
|
||||
import { action, createStore } from 'easy-peasy';
|
||||
import { createStore } from 'easy-peasy';
|
||||
import { ApplicationState } from '@/state/types';
|
||||
import flashes from '@/state/models/flashes';
|
||||
import user from '@/state/models/user';
|
||||
|
||||
const state: ApplicationState = {
|
||||
flashes: {
|
||||
items: [],
|
||||
addFlash: action((state, payload) => {
|
||||
state.items.push(payload);
|
||||
}),
|
||||
clearFlashes: action(state => {
|
||||
state.items = [];
|
||||
}),
|
||||
},
|
||||
flashes,
|
||||
user,
|
||||
};
|
||||
|
||||
export const store = createStore(state);
|
||||
|
||||
Reference in New Issue
Block a user