fix: resolve all 12 TypeScript errors (tsc --noEmit clean)
- mail.ts: add explicit types to decodeMimeHeader callback params - SessionList.tsx: use React.MouseEvent instead of nativeEvent - ComposeModal.tsx: construct name from first_name + last_name - MailDetail.tsx: destructure onReply/onForward from props - RichTextEditor.tsx: use SetContentOptions object instead of boolean - MailSearchBar.tsx: add optional value prop to interface - EmptyState.tsx: add optional children prop - Badge.tsx: add secondary variant to BadgeVariant, variantClasses, dotColors - ConfirmDialog.tsx: add optional children prop - hooks.ts: extend SearchResult type to include mail/file/event
This commit is contained in:
@@ -67,7 +67,7 @@ export interface AuditLogEntry {
|
||||
}
|
||||
|
||||
export interface SearchResult {
|
||||
type: 'company' | 'contact';
|
||||
type: 'company' | 'contact' | 'mail' | 'file' | 'event';
|
||||
id: string;
|
||||
name: string;
|
||||
description?: string;
|
||||
|
||||
@@ -417,7 +417,7 @@ export function decodeMimeHeader(value: string | undefined | null): string {
|
||||
return decodeURIComponent(escape(decoded));
|
||||
} else {
|
||||
// Q encoding: replace _ with space, then decode =XX hex sequences
|
||||
const qDecoded = encoded.replace(/_/g, ' ').replace(/=([0-9A-F]{2})/gi, (_m, hex) => {
|
||||
const qDecoded = encoded.replace(/_/g, ' ').replace(/=([0-9A-F]{2})/gi, (_m: string, hex: string) => {
|
||||
return String.fromCharCode(parseInt(hex, 16));
|
||||
});
|
||||
return decodeURIComponent(escape(qDecoded));
|
||||
|
||||
Reference in New Issue
Block a user