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,7 +1,7 @@
import React from 'react';
import MessageBox from '@/components/MessageBox';
import { State, useStoreState } from 'easy-peasy';
import { ApplicationState } from '@/state/types';
import { ApplicationStore } from '@/state';
type Props = Readonly<{
byKey?: string;
@ -10,7 +10,7 @@ type Props = Readonly<{
}>;
export default ({ withBottomSpace, spacerClass, byKey }: Props) => {
const flashes = useStoreState((state: State<ApplicationState>) => state.flashes.items);
const flashes = useStoreState((state: State<ApplicationStore>) => state.flashes.items);
let filtered = flashes;
if (byKey) {