Skip to content

Commit

Permalink
Show all params in results
Browse files Browse the repository at this point in the history
  • Loading branch information
gdbarnes committed Oct 30, 2024
1 parent b5d6a47 commit 6d8828e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion react_front_end/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ function App() {
const queryString = new URLSearchParams({
search: searchQuery.join(','),
document_type: docTypeQuery.join(','),
publisher: publisherQuery.join(',')
publisher: publisherQuery.join(','),
sort: sortQuery.join(','),
page: pageQuery.join(','),
}).toString();

// fetchData(queryString);
Expand Down
2 changes: 2 additions & 0 deletions react_front_end/src/hooks/useQueryParams.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ const useQueryParams = (key, defaultVal = []) => {
newVals.map(val => {
if (typeof val === 'string' && val.trim() !== '') {
query.append(key, val);
} else if (typeof val === 'number') {
query.append(key, val.toString());
}
});

Expand Down

0 comments on commit 6d8828e

Please sign in to comment.