mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 14:53:45 +02:00
Switch to a context store for server stuff to better support things in the future
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
import { createStore } from 'easy-peasy';
|
||||
import { ApplicationState } from '@/state/types';
|
||||
import flashes from '@/state/models/flashes';
|
||||
import user from '@/state/models/user';
|
||||
import server from '@/state/models/server';
|
||||
import flashes, { FlashStore } from '@/state/flashes';
|
||||
import user, { UserStore } from '@/state/user';
|
||||
|
||||
const state: ApplicationState = {
|
||||
export interface ApplicationStore {
|
||||
flashes: FlashStore;
|
||||
user: UserStore;
|
||||
}
|
||||
|
||||
const state: ApplicationStore = {
|
||||
flashes,
|
||||
user,
|
||||
server,
|
||||
};
|
||||
|
||||
export const store = createStore(state);
|
||||
|
||||
Reference in New Issue
Block a user