mirror of
https://github.com/wassname/talk.git
synced 2026-06-29 20:36:19 +08:00
21 lines
381 B
JavaScript
21 lines
381 B
JavaScript
import * as actions from './constants';
|
|
|
|
const initialState = {
|
|
inProgress: false,
|
|
};
|
|
|
|
export default function reducer(state = initialState, action) {
|
|
switch (action.type) {
|
|
case actions.START_ATTACH:
|
|
return {
|
|
inProgress: true,
|
|
};
|
|
case actions.FINISH_ATTACH:
|
|
return {
|
|
inProgress: false,
|
|
};
|
|
default:
|
|
return state;
|
|
}
|
|
}
|