From 8a85f40e44eddbc8d0c9413d1ee7e5aac4f7a995 Mon Sep 17 00:00:00 2001 From: CheFu Date: Sat, 20 Jun 2026 09:55:49 +0200 Subject: [PATCH] Fix message row syntax errors --- src/components/MessageRow.tsx | 25 ++++--------------------- src/hooks/useAsync.ts | 2 +- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/src/components/MessageRow.tsx b/src/components/MessageRow.tsx index cdd7323..238c912 100644 --- a/src/components/MessageRow.tsx +++ b/src/components/MessageRow.tsx @@ -1,28 +1,12 @@ 'use client'; import { Star } from 'lucide-react'; -import type { MouseEvent } from 'react'; +import type { KeyboardEvent, MouseEvent } from 'react'; import { memo } from 'react'; import { ContactHoverCard } from '@/components/flow-console/ContactHoverCard'; -import { formatListDate, getMessageFolderLabel, sentTrackingKind, sentTrackingLabel } from '@/lib/flow-console/format'; +import { formatListDate, sentTrackingKind, sentTrackingLabel } from '@/lib/flow-console/format'; import { contactFromMessage } from '@/lib/flow-console/mail'; -import type { MailThread } from '@/lib/flow-console/types'; -import styles from './FlowConsole.module.css'; - -interface MessageRowProps { - thread: MailThread; - isSelected: boolean; - onSelect: (threadId: string) => void; - onToggleSelect: (threadId: string) => void; - onToggleStarred: (event: MouseEvent, messageId: string) => void; -import { Star } from 'lucide-react'; -import type { MouseEvent } from 'react'; -import { memo } from 'react'; -import { ContactHoverCard } from '`@/components/flow-console/ContactHoverCard`'; -import type { ContactPreview } from '`@/lib/flow-console/types`'; -import { formatListDate, getMessageFolderLabel, sentTrackingKind, sentTrackingLabel } from '`@/lib/flow-console/format`'; -import { contactFromMessage } from '`@/lib/flow-console/mail`'; -import type { MailThread } from '`@/lib/flow-console/types`'; +import type { ContactPreview, MailThread } from '@/lib/flow-console/types'; import styles from './FlowConsole.module.css'; interface MessageRowProps { @@ -33,8 +17,7 @@ interface MessageRowProps { onToggleStarred: (event: MouseEvent, messageId: string) => void; onOpenCompose: (contact: ContactPreview) => void; onShowStatus: (tool: string, contact: ContactPreview) => void; - onKeyDown: (event: React.KeyboardEvent, threadId: string) => void; -} + onKeyDown: (event: KeyboardEvent, threadId: string) => void; } export const MessageRow = memo(function MessageRow({ diff --git a/src/hooks/useAsync.ts b/src/hooks/useAsync.ts index 20e5d53..37cb069 100644 --- a/src/hooks/useAsync.ts +++ b/src/hooks/useAsync.ts @@ -40,7 +40,7 @@ export function useAsync( mountedRef.current = true; if (immediate) { - execute(); + void Promise.resolve().then(execute); } return () => {