Centralize all redux types into one place, add overrides for the connect, useSelector and useDispatch functions

This commit is contained in:
ErickSkrauch
2020-07-22 13:01:12 +03:00
parent 96e74cf9bb
commit 5a9c54002d
44 changed files with 199 additions and 141 deletions

View File

@@ -2,15 +2,15 @@ import { OauthAppResponse } from 'app/services/api/oauth';
import { Action } from './actions';
export interface Apps {
export interface State {
available: Array<OauthAppResponse>;
}
const defaults: Apps = {
const defaults: State = {
available: [],
};
export default function apps(state: Apps = defaults, action: Action): Apps {
export default function apps(state: State = defaults, action: Action): State {
switch (action.type) {
case 'apps:setAvailable':
return {