import React, { FC, memo } from '../../lib/teact/teact'; import { MessageListType } from '../../global/types'; import useLang, { LangFn } from '../../hooks/useLang'; import './NoMessages.scss'; type OwnProps = { chatId: number; isChatWithSelf?: boolean; type: MessageListType; isGroupChatJustCreated?: boolean; }; const NoMessages: FC = ({ isChatWithSelf, type, isGroupChatJustCreated, }) => { const lang = useLang(); if (type === 'scheduled') { return renderScheduled(lang); } if (isChatWithSelf) { return renderSavedMessages(lang); } if (isGroupChatJustCreated) { return renderGroup(lang); } return (
{lang('NoMessages')}
); }; function renderScheduled(lang: LangFn) { return (
{lang('ScheduledMessages.EmptyPlaceholder')}
); } function renderSavedMessages(lang: LangFn) { return (

{lang('Conversation.CloudStorageInfo.Title')}

  • {lang('Conversation.ClousStorageInfo.Description1')}
  • {lang('Conversation.ClousStorageInfo.Description2')}
  • {lang('Conversation.ClousStorageInfo.Description3')}
  • {lang('Conversation.ClousStorageInfo.Description4')}
); } function renderGroup(lang: LangFn) { return (

{lang('EmptyGroupInfo.Title')}

{lang('EmptyGroupInfo.Subtitle')}

  • {lang('EmptyGroupInfo.Line1')}
  • {lang('EmptyGroupInfo.Line2')}
  • {lang('EmptyGroupInfo.Line3')}
  • {lang('EmptyGroupInfo.Line4')}
); } export default memo(NoMessages);