Skip to content

Commit

Permalink
fix: allows to use ?type=packaging in question game (#570)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfauquette authored Mar 3, 2023
1 parent ea63319 commit 69aa4ef
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/components/QuestionFilter/const.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const insightTypesNames = {
category: "category",
brand: "brand",
product_weight: "product_weight",
packaging: "packaging",
};

export const key2urlParam = {
Expand Down
1 change: 1 addition & 0 deletions src/i18n/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"labels": "Labels",
"brand": "brand",
"brands": "Brands",
"packaging": "packaging",
"quantity": "Quantity",
"insightTypeLabel": "Only shows",
"ingredients": "Ingredients",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"brand": "brand",
"brands": "Brands",
"quantity": "Quantity",
"packaging": "packaging",
"insightTypeLabel": "Only shows",
"ingredients": "Ingredients",
"product_weight": "product weight",
Expand Down
4 changes: 1 addition & 3 deletions src/pages/questions/QuestionFilter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,7 @@ export const QuestionFilter = () => {

if (
Object.keys(exposedParameters).some(
(key) =>
filterState[key] !== undefined &&
exposedParameters[key] !== filterState[key]
(key) => exposedParameters[key] !== filterState[key]
)
) {
dispatch(updateFilter(exposedParameters));
Expand Down
2 changes: 1 addition & 1 deletion src/pages/questions/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const questionBuffer = createSlice({
countryFilter: "",
sortByPopularity: false,
valueTag: "",
predictor: "universal-logo-detector",
predictor: "",
},
},
reducers: {
Expand Down

0 comments on commit 69aa4ef

Please sign in to comment.