feat: job publish
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import { combineReducers } from 'redux';
|
||||
|
||||
import appState from './app';
|
||||
import jobState from './job';
|
||||
import message from './message';
|
||||
import partnerInfo from './partner';
|
||||
import userInfo from './user';
|
||||
@ -10,4 +11,5 @@ export default combineReducers({
|
||||
userInfo,
|
||||
message,
|
||||
partnerInfo,
|
||||
jobState,
|
||||
});
|
||||
|
19
src/store/reducers/job.ts
Normal file
19
src/store/reducers/job.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import { Action } from 'redux';
|
||||
|
||||
import { CreateJobInfo } from '@/types/job';
|
||||
|
||||
import { CREATE_JOB } from '../constants';
|
||||
|
||||
const INIT_STATE: Partial<CreateJobInfo> = {};
|
||||
|
||||
const userInfo = (state: Partial<CreateJobInfo> = INIT_STATE, action: Action): Partial<CreateJobInfo> => {
|
||||
const { type, value } = action as BL.Anything;
|
||||
switch (type) {
|
||||
case CREATE_JOB:
|
||||
return value;
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
};
|
||||
|
||||
export default userInfo;
|
Reference in New Issue
Block a user