Convert all of the login components into hook based ones
This commit is contained in:
parent
aabf9b8a70
commit
328347fab7
20 changed files with 435 additions and 598 deletions
16
resources/scripts/state/index.ts
Normal file
16
resources/scripts/state/index.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
import { action, createStore } from 'easy-peasy';
|
||||
import { ApplicationState } from '@/state/types';
|
||||
|
||||
const state: ApplicationState = {
|
||||
flashes: {
|
||||
items: [],
|
||||
addFlash: action((state, payload) => {
|
||||
state.items.push(payload);
|
||||
}),
|
||||
clearFlashes: action(state => {
|
||||
state.items = [];
|
||||
}),
|
||||
},
|
||||
};
|
||||
|
||||
export const store = createStore(state);
|
Reference in a new issue