Hi there. I'm using a mutation in order to do a post call with axios.
Right now data contains a field data.trackDays which is an array and each trackDay has a trackDayDate field. If I console.log that right before const response = axios.... then will the value of that field be "2022-09-29T22:00:00.000Z".
But if I use the browsers network inspection tool to look at the post request can I see the value now is set to trackDayDate: "2022-09-28T22:00:00.000Z" ?!
Anybody who have a clue what could be causing this?
export const useCreateCarQuote = (
nextStep: string,
locale?: string,
initial?: boolean
) => {
const queryClient = useQueryClient();
const [auth] = useRecoilState(authorizationState);
const [carFormState, setCarFormState] = useRecoilState(CarFormState);
return useMutation(
async (data: any) => {
const response = axios.post<CarQuote>(
`${process.env.GATSBY_API_URL}/trackday/quote`,
{ ...data },
{
headers: {
"Content-Type": "application/json"
},
}
);
return await response;
},