16 lines
350 B
TypeScript
16 lines
350 B
TypeScript
import { Action } from 'redux';
|
|
|
|
import { SET_JOB_ID } from '../constants';
|
|
|
|
const jobInfo = (state: Partial<string | null> = null, action: Action): Partial<string | null> => {
|
|
const { type, value } = action as BL.Anything;
|
|
switch (type) {
|
|
case SET_JOB_ID:
|
|
return value;
|
|
default:
|
|
return state;
|
|
}
|
|
};
|
|
|
|
export default jobInfo;
|