Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import {
Direction,
Focusable,
FocusableTreeNode,
FocusEvent,
FocusManager,
SunbeamProvider,
unstable_defaultGetPreferredChildOnFocusReceive,
KeyPressManager,
} from "react-sunbeam"
import { ProfilesMenu } from "./ProfilesMenu"
import { GamesGallery } from "./GamesGallery"
import { NavigationMenu } from "./NavigationMenu"
const focusManager = new FocusManager({
initialFocusPath: ["gallery", "1"],
})
const keyPressManager = new KeyPressManager()
keyPressManager.addListener(event => {
switch (event.key) {
case "ArrowRight":
event.preventDefault()
focusManager.moveRight()
return
case "ArrowLeft":
event.preventDefault()
focusManager.moveLeft()
return
case "ArrowUp":