mirror of
https://github.com/YMFE/yapi.git
synced 2025-01-12 12:54:48 +08:00
21 lines
334 B
JavaScript
21 lines
334 B
JavaScript
|
import {
|
||
|
FETCH_NEWS_DATA
|
||
|
} from '../../constants/action-types.js'
|
||
|
|
||
|
const initialState = {
|
||
|
newsData: []
|
||
|
}
|
||
|
|
||
|
export default (state = initialState, action) => {
|
||
|
switch (action.type) {
|
||
|
case FETCH_NEWS_DATA: {
|
||
|
return {
|
||
|
...state,
|
||
|
newsData: action.payload
|
||
|
};
|
||
|
}
|
||
|
default:
|
||
|
return state;
|
||
|
}
|
||
|
}
|