diff --git a/src/bundles/extra.ts b/src/bundles/extra.ts index 293ddf5e2..8bf2882c3 100644 --- a/src/bundles/extra.ts +++ b/src/bundles/extra.ts @@ -40,6 +40,7 @@ export { default as NewChatStep2 } from '../components/left/newChat/NewChatStep2 export { default as ArchivedChats } from '../components/left/ArchivedChats'; export { default as ChatFolderModal } from '../components/left/ChatFolderModal'; +// eslint-disable-next-line import/no-cycle export { default as ContextMenuContainer } from '../components/middle/message/ContextMenuContainer'; export { default as SponsoredMessageContextMenuContainer } from '../components/middle/message/SponsoredMessageContextMenuContainer'; diff --git a/src/components/common/FullNameTitle.tsx b/src/components/common/FullNameTitle.tsx index 833a8bca3..a37364606 100644 --- a/src/components/common/FullNameTitle.tsx +++ b/src/components/common/FullNameTitle.tsx @@ -59,7 +59,7 @@ const FullNameTitle: FC = ({ return (
-

{renderText(title)}

+

{renderText(title || '')}

{!noVerified && peer.isVerified && } {!noFake && peer.fakeType && } {withEmojiStatus && emojiStatus && ( diff --git a/src/components/common/TypingStatus.tsx b/src/components/common/TypingStatus.tsx index f3faf8538..5c3fce1e2 100644 --- a/src/components/common/TypingStatus.tsx +++ b/src/components/common/TypingStatus.tsx @@ -27,7 +27,7 @@ const TypingStatus: FC = ({ typingStatus, typingUser }) = const content = lang(typingStatus.action) // Fix for translation "{user} is typing" .replace('{user}', '') - .replace('{emoji}', typingStatus.emoji).trim(); + .replace('{emoji}', typingStatus.emoji || '').trim(); return (

diff --git a/src/components/main/AttachBotInstallModal.tsx b/src/components/main/AttachBotInstallModal.tsx index 75cf80115..adf86a625 100644 --- a/src/components/main/AttachBotInstallModal.tsx +++ b/src/components/main/AttachBotInstallModal.tsx @@ -28,7 +28,7 @@ const AttachBotInstallModal: FC = ({ onClose={cancelAttachBotInstall} confirmHandler={confirmAttachBotInstall} title={name} - textParts={lang('WebApp.AddToAttachmentText', name)} + text={lang('WebApp.AddToAttachmentText', name)} /> ); }; diff --git a/src/components/main/premium/common/PremiumLimitReachedModal.tsx b/src/components/main/premium/common/PremiumLimitReachedModal.tsx index abe80ef1a..fa27eefeb 100644 --- a/src/components/main/premium/common/PremiumLimitReachedModal.tsx +++ b/src/components/main/premium/common/PremiumLimitReachedModal.tsx @@ -172,7 +172,7 @@ const PremiumLimitReachedModal: FC = ({ )}

- {renderText(description, ['simple_markdown', 'br'])} + {renderText(description || '', ['simple_markdown', 'br'])}
diff --git a/src/util/dateFormat.ts b/src/util/dateFormat.ts index 16b255e2e..a930432f6 100644 --- a/src/util/dateFormat.ts +++ b/src/util/dateFormat.ts @@ -98,11 +98,11 @@ export function formatCountdown( } } -export function formatCountdownShort(lang: LangFn, msLeft: number) { +export function formatCountdownShort(lang: LangFn, msLeft: number): string { if (msLeft < 60 * 1000) { - return Math.ceil(msLeft / 1000); + return Math.ceil(msLeft / 1000).toString(); } else if (msLeft < 60 * 60 * 1000) { - return Math.ceil(msLeft / (60 * 1000)); + return Math.ceil(msLeft / (60 * 1000)).toString(); } else if (msLeft < MILLISECONDS_IN_DAY) { return lang('MessageTimer.ShortHours', Math.ceil(msLeft / (60 * 60 * 1000))); } else { diff --git a/src/util/langProvider.ts b/src/util/langProvider.ts index df581e58b..d2ac3aa83 100644 --- a/src/util/langProvider.ts +++ b/src/util/langProvider.ts @@ -12,7 +12,7 @@ import { createCallbackManager } from './callbacks'; import { formatInteger } from './textFormat'; interface LangFn { - (key: string, value?: any, format?: 'i', pluralValue?: number): any; + (key: string, value?: any, format?: 'i', pluralValue?: number): string; isRtl?: boolean; code?: LangCode;