Skip to content

Commit

Permalink
changing setOpen function
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmeets-6575 committed Dec 2, 2023
1 parent 2c8e58b commit b556aa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui-components/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const SearchBar: FC<ISearchBarProps> = (props) => {
useEffect(() => {
const handleKeyDown = (event: KeyboardEvent) => {
if ((event.metaKey || event.ctrlKey) && event.key === 'k') {
setOpen(!open);
setOpen((prev) => !prev);
}
};
document.addEventListener('keydown', handleKeyDown);
Expand Down

0 comments on commit b556aa3

Please sign in to comment.