Skip to content

Commit

Permalink
style(js): fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Dec 31, 2022
1 parent b1b1c78 commit 6d919c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/docsearch-js/src/docsearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ function useRender() {
const [shouldRender, setShouldRender] = useState(true);
const destroy = useCallback(() => {
setShouldRender(false);
}, [shouldRender]);
}, []);

return { shouldRender, destroy };
}

// eslint-disable-next-line react-hooks/rules-of-hooks
export function docsearch(props: DocSearchProps) {
const { shouldRender, destroy } = useRender();

Expand Down

0 comments on commit 6d919c2

Please sign in to comment.