aboutsummaryrefslogtreecommitdiff
path: root/src/components/ToggleShifter.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/ToggleShifter.tsx')
-rw-r--r--src/components/ToggleShifter.tsx26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/components/ToggleShifter.tsx b/src/components/ToggleShifter.tsx
deleted file mode 100644
index 725a8cc..0000000
--- a/src/components/ToggleShifter.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-import Shifter from './Shifter.tsx';
-import { useEffect, useState } from "react";
-
-export default function ToggleShifter() {
- const [isShowingShifter, setShowingShifter] = useState(false);
-
- useEffect(() => {
- const handleKeyDown = (event: KeyboardEvent) => {
- if (event.key === "s") {
- setShowingShifter(prev => !prev);
- }
- };
-
- window.addEventListener("keydown", handleKeyDown);
-
- return () => {
- window.removeEventListener("keydown", handleKeyDown);
- };
- }, []);
-
- return (
- <>
- {isShowingShifter && <Shifter />}
- </>
- );
-}