import { Dispatch } from "redux" ; import { ActionType } from "../action-types" ; import { Action } from "../actions/index" ; export const depositMoney = ( amount ) => { return ( dispatch ) => { dispatch ( { type : ActionType . DEPOSIT , payload : amount } ) ; } ; } ; export const withdrawMoney = ( amount ) => { return ( dispatch ) => { dispatch ( { type : ActionType . WITHDRAW , payload : amount } ) ; } ; } ; export const bankrupt = ( ) => { return ( dispatch ) => { dispatch ( { type : ActionType . BANKRUPT } ) ; } ; } ;