diff --git a/src/components/welcome/Welcome.jsx b/src/components/welcome/Welcome.jsx index d86786fb6..00362ccaf 100644 --- a/src/components/welcome/Welcome.jsx +++ b/src/components/welcome/Welcome.jsx @@ -337,8 +337,6 @@ const Welcome = (props) => { [t, isDesktop, theme] ); - console.log({ steps }); - return ( <> setData((prev) => (prev && prev.length > 0 ? prev.slice(1) : prev)); - console.log(data); return [data, next]; }; diff --git a/src/pages/questions/QuestionFilter.jsx b/src/pages/questions/QuestionFilter.jsx index df5cb6973..7cd249dc1 100644 --- a/src/pages/questions/QuestionFilter.jsx +++ b/src/pages/questions/QuestionFilter.jsx @@ -373,7 +373,7 @@ export const QuestionFilter = () => { setInnerSortByPopularity(event.target.checked) } diff --git a/src/pages/questions/store.js b/src/pages/questions/store.js index a14fb98a8..3a0072745 100644 --- a/src/pages/questions/store.js +++ b/src/pages/questions/store.js @@ -6,6 +6,7 @@ import { } from "@reduxjs/toolkit"; import { IS_DEVELOPMENT_MODE } from "../../const"; +import { DEFAULT_FILTER_STATE } from "../../components/QuestionFilter/const"; import robotoff from "../../robotoff"; import { sleep } from "../../utils"; @@ -44,14 +45,7 @@ export const questionBuffer = createSlice({ answeredQuestions: [], fetchCompletted: false, numberOfQuestionsAvailable: 0, - filterState: { - insightType: "brand", - brandFilter: "", - countryFilter: "", - sortByPopularity: false, - valueTag: "", - predictor: "", - }, + filterState: DEFAULT_FILTER_STATE, }, reducers: { updateFilter: (state, action) => { @@ -177,7 +171,7 @@ export const nbOfQuestionsInBufferSelector = createSelector( export const nextPageSelector = createSelector( getSubState, - (bufferState) => bufferState.remainingQuestions.length + (bufferState) => bufferState.page ); export const currentQuestionSelector = createSelector(