system-praktyk-front/src/state/actions/index.ts
2020-09-05 22:00:13 +02:00

27 lines
1.2 KiB
TypeScript

import { useDispatch as useReduxDispatch } from "react-redux";
import { EditionAction, EditionActions } from "@/state/actions/edition";
import { SettingActions, SettingsAction } from "@/state/actions/settings";
import { InternshipProposalAction, InternshipProposalActions } from "@/state/actions/proposal";
import { InternshipPlanAction, InternshipPlanActions } from "@/state/actions/plan";
import { InsuranceAction, InsuranceActions } from "@/state/actions/insurance";
import { UserAction, UserActions } from "@/state/actions/user";
import { ThunkDispatch } from "redux-thunk";
import { AppState } from "@/state/reducer";
export * from "./base"
export * from "./edition"
export * from "./settings"
export * from "./proposal"
export * from "./plan"
export * from "./user"
export type Action = UserAction | EditionAction | SettingsAction | InternshipProposalAction | InternshipPlanAction | InsuranceAction;
export const Actions = { ...UserActions, ...EditionActions, ...SettingActions, ...InternshipProposalActions, ...InternshipPlanActions, ...InsuranceActions }
export type Actions = typeof Actions;
export const useDispatch = () => useReduxDispatch<ThunkDispatch<AppState, any, Action>>()
export default Actions;