From 53e1ba322dcc79fcda7d2f789cf8fd19a3f00a8e Mon Sep 17 00:00:00 2001 From: Sandro Date: Mon, 26 Oct 2026 15:39:30 +0100 Subject: [PATCH] fix(frontend): resolve TypeScript compiler errors in WorkspaceView and types --- frontend/src/features/workspace/WorkspaceView.tsx | 3 ++- frontend/src/lib/types.ts | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/features/workspace/WorkspaceView.tsx b/frontend/src/features/workspace/WorkspaceView.tsx index ec922f6..f8bcac3 100644 --- a/frontend/src/features/workspace/WorkspaceView.tsx +++ b/frontend/src/features/workspace/WorkspaceView.tsx @@ -449,7 +449,8 @@ export const WorkspaceView: React.FC = ({ } catch {} }; - const handleBlockFocus = (blockId?: string) => { + const handleBlockFocus = (blockIdOrEvent?: string | React.FocusEvent) => { + const blockId = typeof blockIdOrEvent === 'string' ? blockIdOrEvent : undefined; isEditorFocusedRef.current = true; if (idleUnlockTimerRef.current) { clearTimeout(idleUnlockTimerRef.current); diff --git a/frontend/src/lib/types.ts b/frontend/src/lib/types.ts index a29321b..2eb2bb8 100644 --- a/frontend/src/lib/types.ts +++ b/frontend/src/lib/types.ts @@ -157,12 +157,15 @@ export type BlockType = 'h1' | 'h2' | 'h3' | 'paragraph' | 'todo' | 'bullet' | ' export interface DocumentBlock { id: string; + docId?: string; type: BlockType; content: string; checked?: boolean; lang?: string; level?: number; collapsed?: boolean; + sortOrder?: number; + updatedAt?: string; } export interface DocBlocksPatchRequest {