This commit is contained in:
2026-02-04 00:06:16 -05:00
parent f08afb2ed1
commit 7b5c256e07
38 changed files with 933 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
import type { JSX } from "solid-js"
import { useKeyboardShortcuts } from "../hooks/useKeyboardShortcuts"
import type { TabId } from "./Tab"
type KeyboardHandlerProps = {
children?: JSX.Element
onTabSelect: (tab: TabId) => void
}
export function KeyboardHandler(props: KeyboardHandlerProps) {
useKeyboardShortcuts({
onTabNext: () => {
props.onTabSelect("discover")
},
onTabPrev: () => {
props.onTabSelect("settings")
},
})
return <>{props.children}</>
}