Skip to content

Commit

Permalink
fix: tag search in verify and captures filters (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
tranquanghuy0801 authored Dec 4, 2021
1 parent 3a8198e commit 64c3139
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
8 changes: 3 additions & 5 deletions src/components/CaptureFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,9 @@ function Filter(props) {
const [tokenId, setTokenId] = useState(filter?.tokenId || filterOptionAll);

useEffect(() => {
if (tagSearchString === '') {
const abortController = new AbortController();
tagsContext.getTags(tagSearchString, { signal: abortController.signal });
return () => abortController.abort();
}
const abortController = new AbortController();
tagsContext.getTags(tagSearchString, { signal: abortController.signal });
return () => abortController.abort();
}, [tagSearchString]);

const handleDateStartChange = (date) => {
Expand Down
8 changes: 3 additions & 5 deletions src/components/FilterTop.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,9 @@ function Filter(props) {
const [tokenId, setTokenId] = useState(filter?.tokenId || filterOptionAll);

useEffect(() => {
if (tagSearchString === '') {
const abortController = new AbortController();
tagsContext.getTags(tagSearchString, { signal: abortController.signal });
return () => abortController.abort();
}
const abortController = new AbortController();
tagsContext.getTags(tagSearchString, { signal: abortController.signal });
return () => abortController.abort();
}, [tagSearchString]);

const handleDateStartChange = (date) => {
Expand Down

0 comments on commit 64c3139

Please sign in to comment.