Switch to a context store for server stuff to better support things in the future

This commit is contained in:
Dane Everitt 2019-07-09 21:25:57 -07:00
parent 16e6f3f45f
commit 986285402f
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
21 changed files with 218 additions and 148 deletions

View file

@ -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);