Skip to content

Commit

Permalink
update side effect
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 committed Feb 23, 2021
1 parent 1ea2b78 commit 206566f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ export const useKqlSyntax = ({ setValue }: Props) => {

useEffect(() => {
localStorage.setItem(KQL_SYNTAX_LOCAL_STORAGE, String(kqlSyntax));
}, [kqlSyntax]);
setValue('');
}, [kqlSyntax, setValue]);

return { kqlSyntax, setKqlSyntax };
};

0 comments on commit 206566f

Please sign in to comment.