mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-29 14:46:38 +08:00
20 lines
430 B
JavaScript
20 lines
430 B
JavaScript
import config from 'config';
|
|
import * as actionTypes from './actions';
|
|
|
|
export const initialState = config.siteInfo;
|
|
|
|
const siteInfoReducer = (state = initialState, action) => {
|
|
switch (action.type) {
|
|
case actionTypes.SET_SITE_INFO:
|
|
return {
|
|
...state,
|
|
...action.payload,
|
|
isLoading: false, // 添加加载状态
|
|
};
|
|
default:
|
|
return state;
|
|
}
|
|
};
|
|
|
|
export default siteInfoReducer;
|