Я работаю над приложением, использующим Next.js с избыточностью, следуя этому примеру , и здесь есть некоторая часть store.js
// REDUCERS
const authReducer = (state = null, action) => {
switch (action.type){
case actionTypes.FETCH_USER:
return action.payload || false;
default:
return state;
}
}
export const rootReducer = combineReducers({
user: authReducer,
form: reduxForm,
});
// ACTIONS
export const fetchUser = () => {
return (dispatch) => {
axios.get('/api/current_user')
.then(res => dispatch({
type: actionTypes.FETCH_USER,
payload: res.data
}));
};
};
export const submitLogin = (values) => async dispacth => {
const res = await axios.post('/api/login', values);
// Router.push('/');
// console.log(res)
dispacth({ type: actionTypes.SUBMIT_LOGIN, payload: res.data });
};
и сторона клиента, такая какheader
function mapStateToProps (state) {
const { user } = state
return { user }
}
export default connect(mapStateToProps)(Header)
и когда я console.log('############=>', this.props.user);
реквизит и я не залогинен, то он показывает ноль, но показывает некоторые дополнительные данные, такие как скриншот ниже

, но когда я вошел в систему & console.log('############=>', this.props.user);
, он показывает правильные данные без дополнительных данных, таких как изображение ниже

что я делаю не так?Помогите мне, пожалуйста.Спасибо