Skip to content

Commit

Permalink
fix category_id by category_uid on SearchBar useSuggestedCategory
Browse files Browse the repository at this point in the history
  • Loading branch information
joseamietta committed Jan 3, 2024
1 parent 52229b2 commit daa530c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`#useSuggestedCategory returns valid destination 1`] = `"/search.html?query=bar&category_id%5Bfilter%5D=foo%2C1"`;
exports[`#useSuggestedCategory returns valid destination 1`] = `"/search.html?query=bar&category_uid%5Bfilter%5D=foo%2CMQ%3D%3D"`;
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jest.mock('react-router-dom', () => ({
}));

const props = {
categoryId: 1,
categoryId: 'MQ==',
label: 'foo',
searchValue: 'bar'
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const setSearchParams = (existing, options) => {
const { categoryId, label, searchValue } = options;

params.set('query', searchValue);
params.set('category_id[filter]', `${label}${DELIMITER}${categoryId}`);
params.set('category_uid[filter]', `${label}${DELIMITER}${categoryId}`);

return `${params}`;
};
Expand Down

0 comments on commit daa530c

Please sign in to comment.