Skip to content

Commit

Permalink
refactor: optimised code
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhishekPAnil committed Aug 27, 2024
1 parent 82beabe commit 68b401f
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/utils/clearSessionStoredSearchQueries.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
export const clearSessionStoredSearchQueries = () => {
sessionStorage.removeItem('query');
sessionStorage.removeItem('queryTaxonomy');
sessionStorage.removeItem('peopleSearchQuery');
sessionStorage.removeItem('organizationSearchQuery');
sessionStorage.removeItem('placesSearchQuery');
sessionStorage.removeItem('queryUserListing');
[
'query',
'queryTaxonomy',
'peopleSearchQuery',
'organizationSearchQuery',
'placesSearchQuery',
'queryUserListing',
].forEach((key) => {
sessionStorage.removeItem(key);
});
};

0 comments on commit 68b401f

Please sign in to comment.