nit: fix perf regression in hotkeys (#10302)

Co-authored-by: Samuel Newman <mozzius@protonmail.com>
This commit is contained in:
Thomas May
2026-04-20 15:15:05 +02:00
committed by GitHub
parent 5df51bdea7
commit dddc022747
2 changed files with 23 additions and 13 deletions
+11 -4
View File
@@ -1,10 +1,17 @@
import {useMemo} from 'react'
export function Provider({children}: {children: React.ReactNode}) {
return children
}
const noop = () => {}
export function useHotkeysContext() {
return {
enableScope: () => {},
disableScope: () => {},
}
return useMemo(
() => ({
enableScope: noop,
disableScope: noop,
}),
[],
)
}