Skip to content

Commit

Permalink
lint and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
v-rocheleau committed Jul 5, 2023
1 parent 8ebfc60 commit 38dc5ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
6 changes: 1 addition & 5 deletions src/js/components/Search/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const checkQueryParamsEqual = (qp1: QueryParams, qp2: QueryParams): boolean => {
const qp2Keys = Object.keys(qp2);
const params = [...new Set([...qp1Keys, ...qp2Keys])];
return params.reduce((acc, v) => acc && qp1[v] === qp2[v], true);
}
};

const RoutedSearch: React.FC = () => {
const dispatch = useAppDispatch();
Expand Down Expand Up @@ -65,10 +65,6 @@ const RoutedSearch: React.FC = () => {
const queryParam = new URLSearchParams(location.search);
const { valid, validQueryParamsObject } = validateQuery(queryParam);
if (valid) {
console.log({
valid: validQueryParamsObject,
params: queryParams
});
if (!attemptedFetch || !checkQueryParamsEqual(validQueryParamsObject, queryParams)) {
// Only update the state & refresh if we have a new set of query params from the URL.
dispatch(setQueryParams(validQueryParamsObject));
Expand Down
4 changes: 1 addition & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ const config = {
inject: false,
}),
new CopyWebpackPlugin({
patterns: [
{ from: 'src/public', to: 'public' },
],
patterns: [{ from: 'src/public', to: 'public' }],
}),
],
optimization: {
Expand Down

0 comments on commit 38dc5ee

Please sign in to comment.