mirror of
https://github.com/pheralb/svgl.git
synced 2024-11-13 08:46:56 +08:00
⚒️ Add ctrl+k shortcut.
This commit is contained in:
parent
c96546419f
commit
82bdb9f4d6
@ -20,10 +20,15 @@ import CustomLink from "@/common/link";
|
|||||||
import Categories from "./categories";
|
import Categories from "./categories";
|
||||||
import Search from "@/components/search";
|
import Search from "@/components/search";
|
||||||
import CustomIconBtn from "@/common/iconBtn";
|
import CustomIconBtn from "@/common/iconBtn";
|
||||||
|
import { useHotkeys } from "react-hotkeys-hook";
|
||||||
|
|
||||||
const Header = () => {
|
const Header = () => {
|
||||||
const bg = useColorModeValue("bg.light", "bg.dark");
|
const bg = useColorModeValue("bg.light", "bg.dark");
|
||||||
const { isOpen, onToggle } = useDisclosure();
|
const { isOpen, onToggle } = useDisclosure();
|
||||||
|
useHotkeys("ctrl+k", (e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
onToggle();
|
||||||
|
});
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Box
|
<Box
|
||||||
|
Loading…
Reference in New Issue
Block a user