feat: quick add (#2240)
* feat: quick add * style: made text color muted
This commit is contained in:
parent
daa0b16960
commit
771ca585db
17 changed files with 847 additions and 99 deletions
|
|
@ -36,6 +36,7 @@ const useGanttChartIssues = (workspaceSlug: string | undefined, projectId: strin
|
|||
return {
|
||||
ganttIssues,
|
||||
mutateGanttIssues,
|
||||
params,
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
19
web/hooks/use-keypress.tsx
Normal file
19
web/hooks/use-keypress.tsx
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { useEffect } from "react";
|
||||
|
||||
const useKeypress = (key: string, callback: () => void) => {
|
||||
useEffect(() => {
|
||||
const handleKeydown = (event: KeyboardEvent) => {
|
||||
if (event.key === key) {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
document.addEventListener("keydown", handleKeydown);
|
||||
|
||||
return () => {
|
||||
document.removeEventListener("keydown", handleKeydown);
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
export default useKeypress;
|
||||
Loading…
Add table
Add a link
Reference in a new issue