Skip to content

Commit

Permalink
Merge pull request #638 from mahajanmahesh935/category
Browse files Browse the repository at this point in the history
TASK:#0000 Clear domain changes on category page
  • Loading branch information
paritshivani authored Sep 20, 2024
2 parents c22e532 + 64369e5 commit 1d3473c
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions packages/nulp_elite/src/pages/content/CategoryPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,18 @@ const CategoryPage = () => {
const handleDomainFilter = (query, domainName) => {
setSelectedDomain(query);
setDomainName(domainName);
fetchMoreItems(domainName);
// fetchMoreItems(domainName);
};

useEffect(() => {
if (selectedDomain) {
fetchMoreItems(selectedDomain);
}
}, [selectedDomain]);

fetchMoreItems();

}, [selectedDomain,domainName,clearDomains]);

useEffect(() => {
fetchMoreItems(selectedDomain);
}, [currentPage,clearDomains]);
}, [currentPage]);

const handleGoBack = () => {
navigate(-1); // Navigate back in history
Expand Down Expand Up @@ -223,8 +223,9 @@ const CategoryPage = () => {
};

const clearDomain = () => {
setDomainName(null)
setDomainName(null);
setClearDomain(null);
setSelectedDomain(null)
}

useEffect(() => {
Expand Down

0 comments on commit 1d3473c

Please sign in to comment.