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,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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue