-
-
Save Daltonic/c2217eff616b28a2261888ba77c236e7 to your computer and use it in GitHub Desktop.
Dapp Funds
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { CharityStruct, GlobalState, SupportStruct } from '@/utils/type.dt' | |
import { PayloadAction } from '@reduxjs/toolkit' | |
export const globalActions = { | |
setCharities: (state: GlobalState, action: PayloadAction<CharityStruct[]>) => { | |
state.charities = action.payload | |
}, | |
setCharity: (state: GlobalState, action: PayloadAction<CharityStruct | null>) => { | |
state.charity = action.payload | |
}, | |
setSupports: (state: GlobalState, action: PayloadAction<SupportStruct[]>) => { | |
state.supports = action.payload | |
}, | |
setDeleteModal: (state: GlobalState, action: PayloadAction<string>) => { | |
state.deleteModal = action.payload | |
}, | |
setDonorModal: (state: GlobalState, action: PayloadAction<string>) => { | |
state.donorsModal = action.payload | |
}, | |
setSupportModal: (state: GlobalState, action: PayloadAction<string>) => { | |
state.supportModal = action.payload | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment