fix keyboard, finish 05

This commit is contained in:
2026-02-04 01:18:59 -05:00
parent d5ce8452e4
commit bd4747679d
18 changed files with 2432 additions and 193 deletions

View File

@@ -1,21 +1,17 @@
import type { JSX } from "solid-js"
import { useKeyboardShortcuts } from "../hooks/useKeyboardShortcuts"
import type { TabId } from "./Tab"
/**
* @deprecated Use useAppKeyboard hook directly instead.
* This component is kept for backwards compatibility.
*/
type KeyboardHandlerProps = {
children?: JSX.Element
onTabSelect: (tab: TabId) => void
onTabSelect?: (tab: TabId) => void
}
export function KeyboardHandler(props: KeyboardHandlerProps) {
useKeyboardShortcuts({
onTabNext: () => {
props.onTabSelect("discover")
},
onTabPrev: () => {
props.onTabSelect("settings")
},
})
// Keyboard handling has been moved to useAppKeyboard hook
// This component is now just a passthrough
return <>{props.children}</>
}