feat: update of partner

This commit is contained in:
eleanor.mao
2025-05-15 01:02:00 +08:00
parent 7aafc3a789
commit d2ac64f20c
52 changed files with 1435 additions and 265 deletions

View File

@ -2,10 +2,12 @@ import { combineReducers } from 'redux';
import appState from './app';
import message from './message';
import partnerInfo from './partner';
import userInfo from './user';
export default combineReducers({
appState,
userInfo,
message,
partnerInfo,
});

View File

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