()
| 56 | ); |
| 57 | |
| 58 | export function useKeypressContext() { |
| 59 | const context = useContext(KeypressContext); |
| 60 | if (!context) { |
| 61 | throw new Error( |
| 62 | 'useKeypressContext must be used within a KeypressProvider', |
| 63 | ); |
| 64 | } |
| 65 | return context; |
| 66 | } |
| 67 | |
| 68 | export function KeypressProvider({ |
| 69 | children, |
no outgoing calls
no test coverage detected