Skip to content

Commit

Permalink
refactor(sidebar-filter): reorder effects for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
caugner authored Apr 15, 2024
1 parent 48c02a0 commit e1511af
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions client/src/document/organisms/sidebar/filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ export function SidebarFilter() {
}
}, [gleanClick, isActive]);

useEffect(() => {
if (hasTyped) {
gleanClick(SIDEBAR_FILTER_TYPED);
}
}, [gleanClick, hasTyped]);

useEffect(() => {
if (query) {
setTyped(true);
}
}, [query, setTyped]);

useEffect(() => {
if (hasTyped) {
gleanClick(SIDEBAR_FILTER_TYPED);
}
}, [gleanClick, hasTyped]);

useEffect(() => {
if (!isActive) {
setTyped(false);
Expand Down

0 comments on commit e1511af

Please sign in to comment.