"use client"; // useAction — register a page-level action with the global shortcut registry. // Action shows up in the command palette and (if combo provided) shortcuts help. import { useEffect } from "react"; import { shortcuts, type Action } from "@/lib/shortcuts"; export function useAction(action: Action, deps: React.DependencyList = []) { useEffect(() => { return shortcuts.register(action); // eslint-disable-next-line react-hooks/exhaustive-deps }, deps); }