I have a nextjs project in which I use redux. Query values in getServerSideProps give wrong values in production environment.
export const getServerSideProps = wrapper.getServerSideProps(
(store) => async (context) => {
const { query, locale } = context;
const { branch } = query;
console.log('Branch',branch);
await store.dispatch(getBranch(branch, locale));
},
);
This usually happens when changing pages. Both the correct branch is coming and it is sending a request to the wrong one. I am using next-redux-wrapper package for redux. I can't catch this in the development environment. This is why it throws a lot of unnecessary requests to the api.
console.log() result:
Branch: correct-branch
Branch: 7b9adc01e8c2dade.css.map
Why does 7b9adc01e8c2dade.css.map return and how do I block it?