mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-28 11:37:04 +02:00
Merge main into proxy branch (formatting and docs)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { useEffect } from 'react';
|
||||
import { useEffect } from "react";
|
||||
|
||||
export function useKeyboardEvent(
|
||||
event: 'keyup' | 'keydown',
|
||||
key: KeyboardEvent['key'],
|
||||
event: "keyup" | "keydown",
|
||||
key: KeyboardEvent["key"],
|
||||
cb: () => void,
|
||||
) {
|
||||
// biome-ignore lint/correctness/useExhaustiveDependencies: Don't have `cb` as a dep for caller convenience
|
||||
// oxlint-disable-next-line react-hooks/exhaustive-deps -- Don't have `cb` as a dep for caller convenience
|
||||
useEffect(() => {
|
||||
const fn = (e: KeyboardEvent) => {
|
||||
if (e.key === key) cb();
|
||||
|
||||
Reference in New Issue
Block a user