From 4e0f4d99e8569a662030cfcf7d13ba4b073736cd Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Sun, 9 May 2021 01:59:55 +0300 Subject: [PATCH] [Perf] Add `memo` to many components --- src/components/auth/AuthCode.async.tsx | 4 ++-- src/components/auth/AuthPassword.async.tsx | 4 ++-- src/components/auth/AuthQrCode.async.tsx | 4 ++-- src/components/auth/AuthRegister.async.tsx | 4 ++-- src/components/common/CalendarModal.async.tsx | 4 ++-- src/components/common/DeleteMessageModal.async.tsx | 4 ++-- src/components/common/LastMessageMeta.tsx | 4 ++-- src/components/common/MessageOutgoingStatus.tsx | 4 ++-- src/components/common/PinMessageModal.async.tsx | 4 ++-- src/components/common/StickerSetModal.async.tsx | 4 ++-- src/components/common/UnpinAllMessagesModal.async.tsx | 4 ++-- src/components/left/ArchivedChats.async.tsx | 4 ++-- src/components/left/main/Badge.tsx | 4 ++-- src/components/left/main/ContactList.async.tsx | 4 ++-- src/components/left/newChat/NewChat.async.tsx | 4 ++-- src/components/left/newChat/NewChatStep1.async.tsx | 4 ++-- src/components/left/newChat/NewChatStep2.async.tsx | 4 ++-- src/components/left/search/LeftSearch.async.tsx | 4 ++-- src/components/left/settings/Settings.async.tsx | 4 ++-- src/components/main/Errors.async.tsx | 4 ++-- src/components/main/ForwardPicker.async.tsx | 4 ++-- src/components/main/Main.async.tsx | 4 ++-- src/components/main/Notifications.async.tsx | 4 ++-- src/components/middle/HeaderMenuContainer.async.tsx | 4 ++-- src/components/middle/MessageSelectToolbar.async.tsx | 4 ++-- src/components/middle/MobileSearch.async.tsx | 4 ++-- src/components/middle/composer/AttachMenu.async.tsx | 4 ++-- src/components/middle/composer/AttachmentModal.async.tsx | 4 ++-- src/components/middle/composer/BotKeyboardMenu.async.tsx | 4 ++-- src/components/middle/composer/CustomSendMenu.async.tsx | 4 ++-- src/components/middle/composer/DropArea.async.tsx | 4 ++-- src/components/middle/composer/EmojiTooltip.async.tsx | 4 ++-- src/components/middle/composer/MentionMenu.async.tsx | 4 ++-- src/components/middle/composer/PollModal.async.tsx | 4 ++-- src/components/middle/composer/SymbolMenu.async.tsx | 4 ++-- src/components/middle/composer/TextFormatter.async.tsx | 4 ++-- src/components/middle/message/ContextMenuContainer.async.tsx | 4 ++-- src/components/middle/message/MessageMeta.tsx | 4 ++-- src/components/payment/PaymentModal.async.tsx | 4 ++-- src/components/payment/ReceiptModal.async.tsx | 4 ++-- src/components/right/GifSearch.async.tsx | 4 ++-- src/components/right/PollResults.async.tsx | 4 ++-- src/components/right/RightSearch.async.tsx | 4 ++-- src/components/right/StickerSearch.async.tsx | 4 ++-- src/components/right/management/Management.async.tsx | 4 ++-- src/components/ui/RippleEffect.tsx | 4 ++-- 46 files changed, 92 insertions(+), 92 deletions(-) diff --git a/src/components/auth/AuthCode.async.tsx b/src/components/auth/AuthCode.async.tsx index 2b314c9d9..54458e94d 100644 --- a/src/components/auth/AuthCode.async.tsx +++ b/src/components/auth/AuthCode.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../lib/teact/teact'; +import React, { FC, memo } from '../../lib/teact/teact'; import { Bundles } from '../../util/moduleLoader'; import useModuleLoader from '../../hooks/useModuleLoader'; @@ -10,4 +10,4 @@ const AuthCodeAsync: FC = () => { return AuthCode ? : ; }; -export default AuthCodeAsync; +export default memo(AuthCodeAsync); diff --git a/src/components/auth/AuthPassword.async.tsx b/src/components/auth/AuthPassword.async.tsx index 52c871710..d7b5d20a7 100644 --- a/src/components/auth/AuthPassword.async.tsx +++ b/src/components/auth/AuthPassword.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../lib/teact/teact'; +import React, { FC, memo } from '../../lib/teact/teact'; import { Bundles } from '../../util/moduleLoader'; import useModuleLoader from '../../hooks/useModuleLoader'; @@ -10,4 +10,4 @@ const AuthPasswordAsync: FC = () => { return AuthPassword ? : ; }; -export default AuthPasswordAsync; +export default memo(AuthPasswordAsync); diff --git a/src/components/auth/AuthQrCode.async.tsx b/src/components/auth/AuthQrCode.async.tsx index 0efa8035a..18d416fab 100644 --- a/src/components/auth/AuthQrCode.async.tsx +++ b/src/components/auth/AuthQrCode.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../lib/teact/teact'; +import React, { FC, memo } from '../../lib/teact/teact'; import { Bundles } from '../../util/moduleLoader'; import useModuleLoader from '../../hooks/useModuleLoader'; @@ -10,4 +10,4 @@ const AuthQrCodeAsync: FC = () => { return AuthQrCode ? : ; }; -export default AuthQrCodeAsync; +export default memo(AuthQrCodeAsync); diff --git a/src/components/auth/AuthRegister.async.tsx b/src/components/auth/AuthRegister.async.tsx index 5b5a124d4..50512d040 100644 --- a/src/components/auth/AuthRegister.async.tsx +++ b/src/components/auth/AuthRegister.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../lib/teact/teact'; +import React, { FC, memo } from '../../lib/teact/teact'; import { Bundles } from '../../util/moduleLoader'; import useModuleLoader from '../../hooks/useModuleLoader'; @@ -10,4 +10,4 @@ const AuthRegisterAsync: FC = () => { return AuthRegister ? : ; }; -export default AuthRegisterAsync; +export default memo(AuthRegisterAsync); diff --git a/src/components/common/CalendarModal.async.tsx b/src/components/common/CalendarModal.async.tsx index 6ed58f1aa..b740bc143 100644 --- a/src/components/common/CalendarModal.async.tsx +++ b/src/components/common/CalendarModal.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../lib/teact/teact'; +import React, { FC, memo } from '../../lib/teact/teact'; import { OwnProps } from './CalendarModal'; import { Bundles } from '../../util/moduleLoader'; @@ -12,4 +12,4 @@ const CalendarModalAsync: FC = (props) => { return CalendarModal ? : undefined; }; -export default CalendarModalAsync; +export default memo(CalendarModalAsync); diff --git a/src/components/common/DeleteMessageModal.async.tsx b/src/components/common/DeleteMessageModal.async.tsx index 233a704fe..4748f6bba 100644 --- a/src/components/common/DeleteMessageModal.async.tsx +++ b/src/components/common/DeleteMessageModal.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../lib/teact/teact'; +import React, { FC, memo } from '../../lib/teact/teact'; import { OwnProps } from './DeleteMessageModal'; import { Bundles } from '../../util/moduleLoader'; @@ -12,4 +12,4 @@ const DeleteMessageModalAsync: FC = (props) => { return DeleteMessageModal ? : undefined; }; -export default DeleteMessageModalAsync; +export default memo(DeleteMessageModalAsync); diff --git a/src/components/common/LastMessageMeta.tsx b/src/components/common/LastMessageMeta.tsx index 6a4e02e69..72b82c50b 100644 --- a/src/components/common/LastMessageMeta.tsx +++ b/src/components/common/LastMessageMeta.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../lib/teact/teact'; +import React, { FC, memo } from '../../lib/teact/teact'; import { ApiMessage, ApiMessageOutgoingStatus } from '../../api/types'; import { formatPastTimeShort } from '../../util/dateFormat'; @@ -21,4 +21,4 @@ const LastMessageMeta: FC = ({ message, outgoingStatus }) => { ); }; -export default LastMessageMeta; +export default memo(LastMessageMeta); diff --git a/src/components/common/MessageOutgoingStatus.tsx b/src/components/common/MessageOutgoingStatus.tsx index ad183663b..f86c6881f 100644 --- a/src/components/common/MessageOutgoingStatus.tsx +++ b/src/components/common/MessageOutgoingStatus.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../lib/teact/teact'; +import React, { FC, memo } from '../../lib/teact/teact'; import { ApiMessageOutgoingStatus } from '../../api/types'; @@ -26,4 +26,4 @@ const MessageOutgoingStatus: FC = ({ status }) => { ); }; -export default MessageOutgoingStatus; +export default memo(MessageOutgoingStatus); diff --git a/src/components/common/PinMessageModal.async.tsx b/src/components/common/PinMessageModal.async.tsx index 402a4bb59..9c0b3995b 100644 --- a/src/components/common/PinMessageModal.async.tsx +++ b/src/components/common/PinMessageModal.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../lib/teact/teact'; +import React, { FC, memo } from '../../lib/teact/teact'; import { OwnProps } from './PinMessageModal'; import { Bundles } from '../../util/moduleLoader'; @@ -12,4 +12,4 @@ const PinMessageModalAsync: FC = (props) => { return PinMessageModal ? : undefined; }; -export default PinMessageModalAsync; +export default memo(PinMessageModalAsync); diff --git a/src/components/common/StickerSetModal.async.tsx b/src/components/common/StickerSetModal.async.tsx index acd490819..78790ab26 100644 --- a/src/components/common/StickerSetModal.async.tsx +++ b/src/components/common/StickerSetModal.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../lib/teact/teact'; +import React, { FC, memo } from '../../lib/teact/teact'; import { OwnProps } from './StickerSetModal'; import { Bundles } from '../../util/moduleLoader'; @@ -12,4 +12,4 @@ const StickerSetModalAsync: FC = (props) => { return StickerSetModal ? : undefined; }; -export default StickerSetModalAsync; +export default memo(StickerSetModalAsync); diff --git a/src/components/common/UnpinAllMessagesModal.async.tsx b/src/components/common/UnpinAllMessagesModal.async.tsx index c4c889671..1a23bebfc 100644 --- a/src/components/common/UnpinAllMessagesModal.async.tsx +++ b/src/components/common/UnpinAllMessagesModal.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../lib/teact/teact'; +import React, { FC, memo } from '../../lib/teact/teact'; import { OwnProps } from './UnpinAllMessagesModal'; import { Bundles } from '../../util/moduleLoader'; @@ -12,4 +12,4 @@ const UnpinAllMessagesModalAsync: FC = (props) => { return UnpinAllMessagesModal ? : undefined; }; -export default UnpinAllMessagesModalAsync; +export default memo(UnpinAllMessagesModalAsync); diff --git a/src/components/left/ArchivedChats.async.tsx b/src/components/left/ArchivedChats.async.tsx index e6c2cdcab..7b5880095 100644 --- a/src/components/left/ArchivedChats.async.tsx +++ b/src/components/left/ArchivedChats.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../lib/teact/teact'; +import React, { FC, memo } from '../../lib/teact/teact'; import { OwnProps } from './ArchivedChats'; import { Bundles } from '../../util/moduleLoader'; @@ -12,4 +12,4 @@ const ArchivedChatsAsync: FC = (props) => { return ArchivedChats ? : ; }; -export default ArchivedChatsAsync; +export default memo(ArchivedChatsAsync); diff --git a/src/components/left/main/Badge.tsx b/src/components/left/main/Badge.tsx index 67f0b109d..db0301df7 100644 --- a/src/components/left/main/Badge.tsx +++ b/src/components/left/main/Badge.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../../lib/teact/teact'; +import React, { FC, memo } from '../../../lib/teact/teact'; import { ApiChat } from '../../../api/types'; @@ -65,4 +65,4 @@ const Badge: FC = ({ chat, isPinned }) => { ); }; -export default Badge; +export default memo(Badge); diff --git a/src/components/left/main/ContactList.async.tsx b/src/components/left/main/ContactList.async.tsx index 4c8844e27..382a938e4 100644 --- a/src/components/left/main/ContactList.async.tsx +++ b/src/components/left/main/ContactList.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../../lib/teact/teact'; +import React, { FC, memo } from '../../../lib/teact/teact'; import { Bundles } from '../../../util/moduleLoader'; import { OwnProps } from './ContactList'; @@ -12,4 +12,4 @@ const ContactListAsync: FC = (props) => { return ContactList ? : ; }; -export default ContactListAsync; +export default memo(ContactListAsync); diff --git a/src/components/left/newChat/NewChat.async.tsx b/src/components/left/newChat/NewChat.async.tsx index 4d8876213..8ef764874 100644 --- a/src/components/left/newChat/NewChat.async.tsx +++ b/src/components/left/newChat/NewChat.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../../lib/teact/teact'; +import React, { FC, memo } from '../../../lib/teact/teact'; import { Bundles } from '../../../util/moduleLoader'; import { OwnProps } from './NewChat'; @@ -13,4 +13,4 @@ const NewChatAsync: FC = (props) => { return NewChat ? : ; }; -export default NewChatAsync; +export default memo(NewChatAsync); diff --git a/src/components/left/newChat/NewChatStep1.async.tsx b/src/components/left/newChat/NewChatStep1.async.tsx index b5396d6b2..191626b80 100644 --- a/src/components/left/newChat/NewChatStep1.async.tsx +++ b/src/components/left/newChat/NewChatStep1.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../../lib/teact/teact'; +import React, { FC, memo } from '../../../lib/teact/teact'; import { Bundles } from '../../../util/moduleLoader'; import { OwnProps } from './NewChatStep1'; @@ -13,4 +13,4 @@ const NewChatStep1Async: FC = (props) => { return NewChatStep1 ? : ; }; -export default NewChatStep1Async; +export default memo(NewChatStep1Async); diff --git a/src/components/left/newChat/NewChatStep2.async.tsx b/src/components/left/newChat/NewChatStep2.async.tsx index 093abea83..6196cca8b 100644 --- a/src/components/left/newChat/NewChatStep2.async.tsx +++ b/src/components/left/newChat/NewChatStep2.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../../lib/teact/teact'; +import React, { FC, memo } from '../../../lib/teact/teact'; import { Bundles } from '../../../util/moduleLoader'; import { OwnProps } from './NewChatStep2'; @@ -13,4 +13,4 @@ const NewChatStep2Async: FC = (props) => { return NewChatStep2 ? : ; }; -export default NewChatStep2Async; +export default memo(NewChatStep2Async); diff --git a/src/components/left/search/LeftSearch.async.tsx b/src/components/left/search/LeftSearch.async.tsx index a16ca183c..af6747e16 100644 --- a/src/components/left/search/LeftSearch.async.tsx +++ b/src/components/left/search/LeftSearch.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../../lib/teact/teact'; +import React, { FC, memo } from '../../../lib/teact/teact'; import { Bundles } from '../../../util/moduleLoader'; import { OwnProps } from './LeftSearch'; @@ -12,4 +12,4 @@ const LeftSearchAsync: FC = (props) => { return LeftSearch ? : ; }; -export default LeftSearchAsync; +export default memo(LeftSearchAsync); diff --git a/src/components/left/settings/Settings.async.tsx b/src/components/left/settings/Settings.async.tsx index 244a14484..6b409bff0 100644 --- a/src/components/left/settings/Settings.async.tsx +++ b/src/components/left/settings/Settings.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../../lib/teact/teact'; +import React, { FC, memo } from '../../../lib/teact/teact'; import { Bundles } from '../../../util/moduleLoader'; import { OwnProps } from './Settings'; @@ -13,4 +13,4 @@ const SettingsAsync: FC = (props) => { return Settings ? : ; }; -export default SettingsAsync; +export default memo(SettingsAsync); diff --git a/src/components/main/Errors.async.tsx b/src/components/main/Errors.async.tsx index 8df3a4be2..119288978 100644 --- a/src/components/main/Errors.async.tsx +++ b/src/components/main/Errors.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../lib/teact/teact'; +import React, { FC, memo } from '../../lib/teact/teact'; import { Bundles } from '../../util/moduleLoader'; import useModuleLoader from '../../hooks/useModuleLoader'; @@ -10,4 +10,4 @@ const ErrorsAsync: FC = ({ isOpen }) => { return Errors ? : undefined; }; -export default ErrorsAsync; +export default memo(ErrorsAsync); diff --git a/src/components/main/ForwardPicker.async.tsx b/src/components/main/ForwardPicker.async.tsx index f232fcc5b..b226ed861 100644 --- a/src/components/main/ForwardPicker.async.tsx +++ b/src/components/main/ForwardPicker.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../lib/teact/teact'; +import React, { FC, memo } from '../../lib/teact/teact'; import { Bundles } from '../../util/moduleLoader'; import { OwnProps } from './ForwardPicker'; @@ -12,4 +12,4 @@ const ForwardPickerAsync: FC = (props) => { return ForwardPicker ? : undefined; }; -export default ForwardPickerAsync; +export default memo(ForwardPickerAsync); diff --git a/src/components/main/Main.async.tsx b/src/components/main/Main.async.tsx index 8f5af1207..915d5efd5 100644 --- a/src/components/main/Main.async.tsx +++ b/src/components/main/Main.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../lib/teact/teact'; +import React, { FC, memo } from '../../lib/teact/teact'; import { Bundles } from '../../util/moduleLoader'; import useModuleLoader from '../../hooks/useModuleLoader'; @@ -9,4 +9,4 @@ const MainAsync: FC = () => { return Main ?
: undefined; }; -export default MainAsync; +export default memo(MainAsync); diff --git a/src/components/main/Notifications.async.tsx b/src/components/main/Notifications.async.tsx index 3bba91cf5..8e457a567 100644 --- a/src/components/main/Notifications.async.tsx +++ b/src/components/main/Notifications.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../lib/teact/teact'; +import React, { FC, memo } from '../../lib/teact/teact'; import { Bundles } from '../../util/moduleLoader'; import useModuleLoader from '../../hooks/useModuleLoader'; @@ -10,4 +10,4 @@ const NotificationsAsync: FC = ({ isOpen }) => { return Notifications ? : undefined; }; -export default NotificationsAsync; +export default memo(NotificationsAsync); diff --git a/src/components/middle/HeaderMenuContainer.async.tsx b/src/components/middle/HeaderMenuContainer.async.tsx index 2017d175a..47e309e18 100644 --- a/src/components/middle/HeaderMenuContainer.async.tsx +++ b/src/components/middle/HeaderMenuContainer.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../lib/teact/teact'; +import React, { FC, memo } from '../../lib/teact/teact'; import { OwnProps } from './HeaderMenuContainer'; import { Bundles } from '../../util/moduleLoader'; @@ -12,4 +12,4 @@ const HeaderMenuContainerAsync: FC = (props) => { return HeaderMenuContainer ? : undefined; }; -export default HeaderMenuContainerAsync; +export default memo(HeaderMenuContainerAsync); diff --git a/src/components/middle/MessageSelectToolbar.async.tsx b/src/components/middle/MessageSelectToolbar.async.tsx index a19554866..7e74f2830 100644 --- a/src/components/middle/MessageSelectToolbar.async.tsx +++ b/src/components/middle/MessageSelectToolbar.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../lib/teact/teact'; +import React, { FC, memo } from '../../lib/teact/teact'; import { Bundles } from '../../util/moduleLoader'; import { OwnProps } from './MessageSelectToolbar'; @@ -12,4 +12,4 @@ const MessageSelectToolbarAsync: FC = (props) => { return MessageSelectToolbar ? : undefined; }; -export default MessageSelectToolbarAsync; +export default memo(MessageSelectToolbarAsync); diff --git a/src/components/middle/MobileSearch.async.tsx b/src/components/middle/MobileSearch.async.tsx index e6d73ba36..c22731ecf 100644 --- a/src/components/middle/MobileSearch.async.tsx +++ b/src/components/middle/MobileSearch.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../lib/teact/teact'; +import React, { FC, memo } from '../../lib/teact/teact'; import { OwnProps } from './MobileSearch'; import { Bundles } from '../../util/moduleLoader'; @@ -12,4 +12,4 @@ const MobileSearchAsync: FC = (props) => { return MobileSearch ? : undefined; }; -export default MobileSearchAsync; +export default memo(MobileSearchAsync); diff --git a/src/components/middle/composer/AttachMenu.async.tsx b/src/components/middle/composer/AttachMenu.async.tsx index f183d78ab..c1bb64e6e 100644 --- a/src/components/middle/composer/AttachMenu.async.tsx +++ b/src/components/middle/composer/AttachMenu.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../../lib/teact/teact'; +import React, { FC, memo } from '../../../lib/teact/teact'; import { OwnProps } from './AttachMenu'; import { Bundles } from '../../../util/moduleLoader'; @@ -12,4 +12,4 @@ const AttachMenuAsync: FC = (props) => { return AttachMenu ? : undefined; }; -export default AttachMenuAsync; +export default memo(AttachMenuAsync); diff --git a/src/components/middle/composer/AttachmentModal.async.tsx b/src/components/middle/composer/AttachmentModal.async.tsx index a40feb0a1..933bb1694 100644 --- a/src/components/middle/composer/AttachmentModal.async.tsx +++ b/src/components/middle/composer/AttachmentModal.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../../lib/teact/teact'; +import React, { FC, memo } from '../../../lib/teact/teact'; import { OwnProps } from './AttachmentModal'; import { Bundles } from '../../../util/moduleLoader'; @@ -12,4 +12,4 @@ const AttachmentModalAsync: FC = (props) => { return AttachmentModal ? : undefined; }; -export default AttachmentModalAsync; +export default memo(AttachmentModalAsync); diff --git a/src/components/middle/composer/BotKeyboardMenu.async.tsx b/src/components/middle/composer/BotKeyboardMenu.async.tsx index 8258875bb..e2fb202e6 100644 --- a/src/components/middle/composer/BotKeyboardMenu.async.tsx +++ b/src/components/middle/composer/BotKeyboardMenu.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../../lib/teact/teact'; +import React, { FC, memo } from '../../../lib/teact/teact'; import { OwnProps } from './BotKeyboardMenu'; import { Bundles } from '../../../util/moduleLoader'; @@ -12,4 +12,4 @@ const BotKeyboardMenuAsync: FC = (props) => { return BotKeyboardMenu ? : undefined; }; -export default BotKeyboardMenuAsync; +export default memo(BotKeyboardMenuAsync); diff --git a/src/components/middle/composer/CustomSendMenu.async.tsx b/src/components/middle/composer/CustomSendMenu.async.tsx index edc7d6910..9f6ca62a7 100644 --- a/src/components/middle/composer/CustomSendMenu.async.tsx +++ b/src/components/middle/composer/CustomSendMenu.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../../lib/teact/teact'; +import React, { FC, memo } from '../../../lib/teact/teact'; import { OwnProps } from './CustomSendMenu'; import { Bundles } from '../../../util/moduleLoader'; @@ -12,4 +12,4 @@ const CustomSendMenuAsync: FC = (props) => { return CustomSend ? : undefined; }; -export default CustomSendMenuAsync; +export default memo(CustomSendMenuAsync); diff --git a/src/components/middle/composer/DropArea.async.tsx b/src/components/middle/composer/DropArea.async.tsx index a53d25ef4..621f82c60 100644 --- a/src/components/middle/composer/DropArea.async.tsx +++ b/src/components/middle/composer/DropArea.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../../lib/teact/teact'; +import React, { FC, memo } from '../../../lib/teact/teact'; import { OwnProps } from './DropArea'; import { Bundles } from '../../../util/moduleLoader'; @@ -12,5 +12,5 @@ const DropAreaAsync: FC = (props) => { return DropArea ? : undefined; }; -export default DropAreaAsync; +export default memo(DropAreaAsync); export { DropAreaState } from './DropArea'; diff --git a/src/components/middle/composer/EmojiTooltip.async.tsx b/src/components/middle/composer/EmojiTooltip.async.tsx index 9a0f67d29..e581b3156 100644 --- a/src/components/middle/composer/EmojiTooltip.async.tsx +++ b/src/components/middle/composer/EmojiTooltip.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../../lib/teact/teact'; +import React, { FC, memo } from '../../../lib/teact/teact'; import { OwnProps } from './EmojiTooltip'; import { Bundles } from '../../../util/moduleLoader'; @@ -12,4 +12,4 @@ const EmojiTooltipAsync: FC = (props) => { return EmojiTooltip ? : undefined; }; -export default EmojiTooltipAsync; +export default memo(EmojiTooltipAsync); diff --git a/src/components/middle/composer/MentionMenu.async.tsx b/src/components/middle/composer/MentionMenu.async.tsx index d8449fa7c..01e99dab8 100644 --- a/src/components/middle/composer/MentionMenu.async.tsx +++ b/src/components/middle/composer/MentionMenu.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../../lib/teact/teact'; +import React, { FC, memo } from '../../../lib/teact/teact'; import { OwnProps } from './MentionMenu'; import { Bundles } from '../../../util/moduleLoader'; @@ -12,4 +12,4 @@ const MentionMenuAsync: FC = (props) => { return MentionMenu ? : undefined; }; -export default MentionMenuAsync; +export default memo(MentionMenuAsync); diff --git a/src/components/middle/composer/PollModal.async.tsx b/src/components/middle/composer/PollModal.async.tsx index fc1224c00..bdbd373f9 100644 --- a/src/components/middle/composer/PollModal.async.tsx +++ b/src/components/middle/composer/PollModal.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../../lib/teact/teact'; +import React, { FC, memo } from '../../../lib/teact/teact'; import { OwnProps } from './PollModal'; import { Bundles } from '../../../util/moduleLoader'; @@ -12,4 +12,4 @@ const PollModalAsync: FC = (props) => { return PollModal ? : undefined; }; -export default PollModalAsync; +export default memo(PollModalAsync); diff --git a/src/components/middle/composer/SymbolMenu.async.tsx b/src/components/middle/composer/SymbolMenu.async.tsx index fd24b8113..9d06659f7 100644 --- a/src/components/middle/composer/SymbolMenu.async.tsx +++ b/src/components/middle/composer/SymbolMenu.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../../lib/teact/teact'; +import React, { FC, memo } from '../../../lib/teact/teact'; import { OwnProps } from './SymbolMenu'; import { Bundles } from '../../../util/moduleLoader'; @@ -12,4 +12,4 @@ const SymbolMenuAsync: FC = (props) => { return SymbolMenu ? : undefined; }; -export default SymbolMenuAsync; +export default memo(SymbolMenuAsync); diff --git a/src/components/middle/composer/TextFormatter.async.tsx b/src/components/middle/composer/TextFormatter.async.tsx index 0ec8cf379..fa588d8bb 100644 --- a/src/components/middle/composer/TextFormatter.async.tsx +++ b/src/components/middle/composer/TextFormatter.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../../lib/teact/teact'; +import React, { FC, memo } from '../../../lib/teact/teact'; import { OwnProps } from './TextFormatter'; import { Bundles } from '../../../util/moduleLoader'; @@ -12,4 +12,4 @@ const TextFormatterAsync: FC = (props) => { return TextFormatter ? : undefined; }; -export default TextFormatterAsync; +export default memo(TextFormatterAsync); diff --git a/src/components/middle/message/ContextMenuContainer.async.tsx b/src/components/middle/message/ContextMenuContainer.async.tsx index 37b35c77b..22176b757 100644 --- a/src/components/middle/message/ContextMenuContainer.async.tsx +++ b/src/components/middle/message/ContextMenuContainer.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../../lib/teact/teact'; +import React, { FC, memo } from '../../../lib/teact/teact'; import { OwnProps } from './ContextMenuContainer'; import { Bundles } from '../../../util/moduleLoader'; @@ -12,4 +12,4 @@ const ContextMenuContainerAsync: FC = (props) => { return ContextMenuContainer ? : undefined; }; -export default ContextMenuContainerAsync; +export default memo(ContextMenuContainerAsync); diff --git a/src/components/middle/message/MessageMeta.tsx b/src/components/middle/message/MessageMeta.tsx index 757f874c2..b5b2d18c3 100644 --- a/src/components/middle/message/MessageMeta.tsx +++ b/src/components/middle/message/MessageMeta.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../../lib/teact/teact'; +import React, { FC, memo } from '../../../lib/teact/teact'; import { ApiMessage, ApiMessageOutgoingStatus } from '../../../api/types'; @@ -47,4 +47,4 @@ const MessageMeta: FC = ({ ); }; -export default MessageMeta; +export default memo(MessageMeta); diff --git a/src/components/payment/PaymentModal.async.tsx b/src/components/payment/PaymentModal.async.tsx index 1e8ab47df..b00277b43 100644 --- a/src/components/payment/PaymentModal.async.tsx +++ b/src/components/payment/PaymentModal.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../lib/teact/teact'; +import React, { FC, memo } from '../../lib/teact/teact'; import { OwnProps } from './PaymentModal'; import { Bundles } from '../../util/moduleLoader'; @@ -12,4 +12,4 @@ const PaymentModalAsync: FC = (props) => { return PaymentModal ? : undefined; }; -export default PaymentModalAsync; +export default memo(PaymentModalAsync); diff --git a/src/components/payment/ReceiptModal.async.tsx b/src/components/payment/ReceiptModal.async.tsx index 1d23ee87d..d2a051aa7 100644 --- a/src/components/payment/ReceiptModal.async.tsx +++ b/src/components/payment/ReceiptModal.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../lib/teact/teact'; +import React, { FC, memo } from '../../lib/teact/teact'; import { OwnProps } from './ReceiptModal'; import { Bundles } from '../../util/moduleLoader'; @@ -12,4 +12,4 @@ const ReceiptModalAsync: FC = (props) => { return ReceiptModal ? : undefined; }; -export default ReceiptModalAsync; +export default memo(ReceiptModalAsync); diff --git a/src/components/right/GifSearch.async.tsx b/src/components/right/GifSearch.async.tsx index ce001e685..1bc07485e 100644 --- a/src/components/right/GifSearch.async.tsx +++ b/src/components/right/GifSearch.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../lib/teact/teact'; +import React, { FC, memo } from '../../lib/teact/teact'; import { Bundles } from '../../util/moduleLoader'; import useModuleLoader from '../../hooks/useModuleLoader'; @@ -11,4 +11,4 @@ const GifSearchAsync: FC = () => { return GifSearch ? : ; }; -export default GifSearchAsync; +export default memo(GifSearchAsync); diff --git a/src/components/right/PollResults.async.tsx b/src/components/right/PollResults.async.tsx index 3191763ab..dcf36c817 100644 --- a/src/components/right/PollResults.async.tsx +++ b/src/components/right/PollResults.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../lib/teact/teact'; +import React, { FC, memo } from '../../lib/teact/teact'; import { Bundles } from '../../util/moduleLoader'; import useModuleLoader from '../../hooks/useModuleLoader'; @@ -10,4 +10,4 @@ const PollResultsAsync: FC = () => { return PollResults ? : ; }; -export default PollResultsAsync; +export default memo(PollResultsAsync); diff --git a/src/components/right/RightSearch.async.tsx b/src/components/right/RightSearch.async.tsx index aefe9a689..4c2779d67 100644 --- a/src/components/right/RightSearch.async.tsx +++ b/src/components/right/RightSearch.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../lib/teact/teact'; +import React, { FC, memo } from '../../lib/teact/teact'; import { OwnProps } from './RightSearch'; import { Bundles } from '../../util/moduleLoader'; @@ -12,4 +12,4 @@ const RightSearchAsync: FC = (props) => { return RightSearch ? : ; }; -export default RightSearchAsync; +export default memo(RightSearchAsync); diff --git a/src/components/right/StickerSearch.async.tsx b/src/components/right/StickerSearch.async.tsx index e3dda97f7..b857b13a5 100644 --- a/src/components/right/StickerSearch.async.tsx +++ b/src/components/right/StickerSearch.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../lib/teact/teact'; +import React, { FC, memo } from '../../lib/teact/teact'; import { Bundles } from '../../util/moduleLoader'; import useModuleLoader from '../../hooks/useModuleLoader'; @@ -11,4 +11,4 @@ const StickerSearchAsync: FC = () => { return StickerSearch ? : ; }; -export default StickerSearchAsync; +export default memo(StickerSearchAsync); diff --git a/src/components/right/management/Management.async.tsx b/src/components/right/management/Management.async.tsx index 5f70951e3..80d3747dd 100644 --- a/src/components/right/management/Management.async.tsx +++ b/src/components/right/management/Management.async.tsx @@ -1,4 +1,4 @@ -import React, { FC } from '../../../lib/teact/teact'; +import React, { FC, memo } from '../../../lib/teact/teact'; import { Bundles } from '../../../util/moduleLoader'; import { OwnProps } from './Management'; @@ -14,4 +14,4 @@ const ManagementAsync: FC = (props) => { return Management ? : ; }; -export default ManagementAsync; +export default memo(ManagementAsync); diff --git a/src/components/ui/RippleEffect.tsx b/src/components/ui/RippleEffect.tsx index 3b76efc7d..8c41bb3c0 100644 --- a/src/components/ui/RippleEffect.tsx +++ b/src/components/ui/RippleEffect.tsx @@ -1,5 +1,5 @@ import React, { - FC, useCallback, useMemo, useState, + FC, useCallback, useMemo, useState, memo, } from '../../lib/teact/teact'; import { debounce } from '../../util/schedulers'; @@ -58,4 +58,4 @@ const RippleEffect: FC = () => { ); }; -export default RippleEffect; +export default memo(RippleEffect);