import { Action } from 'redux'; import { PartnerInfo } from '@/types/partner'; import { SET_INVITE_CODE } from '../constants'; const INIT_STATE: Partial = {}; const partnerInfo = (state: Partial = INIT_STATE, action: Action): Partial => { const { type, value } = action as BL.Anything; switch (type) { case SET_INVITE_CODE: { return { inviteCode: value, }; } default: return state; } }; export default partnerInfo;