From ab3885eaa1797773760d9106f5cc25e705a9d2c8 Mon Sep 17 00:00:00 2001 From: Riccardo Giorato Date: Fri, 26 Dec 2025 19:29:49 +0100 Subject: [PATCH] Add keyboard shortcut for form submission and remove unused useEffect --- components/editor/editor-toolbar.tsx | 4 +-- components/editor/generate-page-modal.tsx | 16 ++++++--- components/landing/comic-creation-form.tsx | 29 ++++------------ hooks/use-keyboard-shortcut.ts | 39 ++++++++++++++++++++++ 4 files changed, 60 insertions(+), 28 deletions(-) create mode 100644 hooks/use-keyboard-shortcut.ts diff --git a/components/editor/editor-toolbar.tsx b/components/editor/editor-toolbar.tsx index c5ed48c..bc8942f 100644 --- a/components/editor/editor-toolbar.tsx +++ b/components/editor/editor-toolbar.tsx @@ -22,7 +22,7 @@ export function EditorToolbar({ variant="ghost" size="icon" onClick={() => router.push("/stories")} - className="hover:bg-secondary text-muted-foreground hover:text-white flex-shrink-0" + className="hover:bg-secondary text-muted-foreground hover:text-white shrink-0" > @@ -32,7 +32,7 @@ export function EditorToolbar({ -
+