cleaning, prolly broke a lot but whatever

This commit is contained in:
Arjun Patel
2022-02-01 10:38:45 -08:00
parent 462139b930
commit 4073d526bd
54 changed files with 84 additions and 5402 deletions
@@ -0,0 +1,23 @@
import { QueryRoutes } from "@nirvana/common/helpers/routes";
import { useRouter } from "next/router";
import { GlobalHotKeys, KeyMap, configure } from "react-hotkeys";
configure({
ignoreTags: [],
});
export default function KeyboardShortcutHandler() {
const router = useRouter();
const handleEscape = () => {
console.log("woah");
router.push({ query: { page: QueryRoutes.convos } });
};
const keyMap: KeyMap = {
ESCAPE: "esc",
};
const handlers = { ESCAPE: handleEscape };
return <GlobalHotKeys handlers={handlers} keyMap={keyMap} />;
}