Switch to a context store for server stuff to better support things in the future
This commit is contained in:
parent
16e6f3f45f
commit
986285402f
21 changed files with 218 additions and 148 deletions
|
@ -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 a new issue