[Perf] Remove some redundant memo containers
This commit is contained in:
parent
be7920f9e0
commit
e056ed231b
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
@ -11,4 +11,4 @@ const AuthCodeAsync: FC = () => {
|
||||
return AuthCode ? <AuthCode /> : <Loading />;
|
||||
};
|
||||
|
||||
export default memo(AuthCodeAsync);
|
||||
export default AuthCodeAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
@ -11,4 +11,4 @@ const AuthPasswordAsync: FC = () => {
|
||||
return AuthPassword ? <AuthPassword /> : <Loading />;
|
||||
};
|
||||
|
||||
export default memo(AuthPasswordAsync);
|
||||
export default AuthPasswordAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
@ -11,4 +11,4 @@ const AuthRegisterAsync: FC = () => {
|
||||
return AuthRegister ? <AuthRegister /> : <Loading />;
|
||||
};
|
||||
|
||||
export default memo(AuthRegisterAsync);
|
||||
export default AuthRegisterAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
@ -14,4 +14,4 @@ const ActiveCallHeaderAsync: FC<OwnProps> = (props) => {
|
||||
return ActiveCallHeader ? <ActiveCallHeader /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(ActiveCallHeaderAsync);
|
||||
export default ActiveCallHeaderAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
import type { OwnProps } from './GroupCall';
|
||||
@ -12,4 +12,4 @@ const GroupCallAsync: FC<OwnProps> = (props) => {
|
||||
return GroupCall ? <GroupCall {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(GroupCallAsync);
|
||||
export default GroupCallAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
@ -14,4 +14,4 @@ const PhoneCallAsync: FC<OwnProps> = (props) => {
|
||||
return PhoneCall ? <PhoneCall /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(PhoneCallAsync);
|
||||
export default PhoneCallAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './RatePhoneCallModal';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
@ -14,4 +14,4 @@ const RatePhoneCallModalAsync: FC<OwnProps> = (props) => {
|
||||
return RatePhoneCallModal ? <RatePhoneCallModal {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(RatePhoneCallModalAsync);
|
||||
export default RatePhoneCallModalAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import type { OwnProps } from './AboutAdsModal';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const AboutAdsModalAsync: FC<OwnProps> = (props) => {
|
||||
return AboutAdsModal ? <AboutAdsModal {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(AboutAdsModalAsync);
|
||||
export default AboutAdsModalAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import type { OwnProps } from './CalendarModal';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const CalendarModalAsync: FC<OwnProps> = (props) => {
|
||||
return CalendarModal ? <CalendarModal {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(CalendarModalAsync);
|
||||
export default CalendarModalAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import type { OwnProps } from './CustomEmojiSetsModal';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const CustomEmojiSetsModalAsync: FC<OwnProps> = (props) => {
|
||||
return CustomEmojiSetsModal ? <CustomEmojiSetsModal {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(CustomEmojiSetsModalAsync);
|
||||
export default CustomEmojiSetsModalAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import type { OwnProps } from './DeleteMessageModal';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const DeleteMessageModalAsync: FC<OwnProps> = (props) => {
|
||||
return DeleteMessageModal ? <DeleteMessageModal {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(DeleteMessageModalAsync);
|
||||
export default DeleteMessageModalAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import type { OwnProps } from './PinMessageModal';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const PinMessageModalAsync: FC<OwnProps> = (props) => {
|
||||
return PinMessageModal ? <PinMessageModal {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(PinMessageModalAsync);
|
||||
export default PinMessageModalAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import type { OwnProps } from './SeenByModal';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const SeenByModalAsync: FC<OwnProps> = (props) => {
|
||||
return SeenByModal ? <SeenByModal {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(SeenByModalAsync);
|
||||
export default SeenByModalAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import type { OwnProps } from './StickerSetModal';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const StickerSetModalAsync: FC<OwnProps> = (props) => {
|
||||
return StickerSetModal ? <StickerSetModal {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(StickerSetModalAsync);
|
||||
export default StickerSetModalAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import type { OwnProps } from './UnpinAllMessagesModal';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const UnpinAllMessagesModalAsync: FC<OwnProps> = (props) => {
|
||||
return UnpinAllMessagesModal ? <UnpinAllMessagesModal {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(UnpinAllMessagesModalAsync);
|
||||
export default UnpinAllMessagesModalAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import type { OwnProps } from './ArchivedChats';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const ArchivedChatsAsync: FC<OwnProps> = (props) => {
|
||||
return ArchivedChats ? <ArchivedChats {...props} /> : <Loading />;
|
||||
};
|
||||
|
||||
export default memo(ArchivedChatsAsync);
|
||||
export default ArchivedChatsAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
import type { OwnProps } from './ChatFolderModal';
|
||||
|
||||
@ -13,4 +13,4 @@ const ChatFolderModalAsync: FC<OwnProps> = (props) => {
|
||||
return ChatFolderModal ? <ChatFolderModal {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(ChatFolderModalAsync);
|
||||
export default ChatFolderModalAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
import type { OwnProps } from './MuteChatModal';
|
||||
|
||||
@ -13,4 +13,4 @@ const MuteChatModalAsync: FC<OwnProps> = (props) => {
|
||||
return MuteChatModal ? <MuteChatModal {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(MuteChatModalAsync);
|
||||
export default MuteChatModalAsync;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, {
|
||||
useState, useEffect, memo, useCallback, useMemo,
|
||||
useState, useEffect, useCallback, useMemo,
|
||||
} from '../../lib/teact/teact';
|
||||
|
||||
import buildClassName from '../../util/buildClassName';
|
||||
@ -83,4 +83,4 @@ const NewChatButton: FC<OwnProps> = ({
|
||||
);
|
||||
};
|
||||
|
||||
export default memo(NewChatButton);
|
||||
export default NewChatButton;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
import type { OwnProps } from './ContactList';
|
||||
|
||||
@ -13,4 +13,4 @@ const ContactListAsync: FC<OwnProps> = (props) => {
|
||||
return ContactList ? <ContactList {...props} /> : <Loading />;
|
||||
};
|
||||
|
||||
export default memo(ContactListAsync);
|
||||
export default ContactListAsync;
|
||||
|
||||
@ -17,8 +17,8 @@ import {
|
||||
DEBUG,
|
||||
FEEDBACK_URL,
|
||||
IS_BETA,
|
||||
IS_TEST,
|
||||
IS_ELECTRON,
|
||||
IS_TEST,
|
||||
PRODUCTION_HOSTNAME,
|
||||
} from '../../../config';
|
||||
import { IS_APP } from '../../../util/windowEnvironment';
|
||||
@ -33,7 +33,10 @@ import { setPermanentWebVersion } from '../../../util/permanentWebVersion';
|
||||
import { clearWebsync } from '../../../util/websync';
|
||||
import {
|
||||
selectCanSetPasscode,
|
||||
selectCurrentMessageList, selectIsCurrentUserPremium, selectTabState, selectTheme,
|
||||
selectCurrentMessageList,
|
||||
selectIsCurrentUserPremium,
|
||||
selectTabState,
|
||||
selectTheme,
|
||||
} from '../../../global/selectors';
|
||||
import useLang from '../../../hooks/useLang';
|
||||
import useConnectionStatus from '../../../hooks/useConnectionStatus';
|
||||
@ -93,6 +96,8 @@ type StateProps =
|
||||
& Pick<GlobalState, 'connectionState' | 'isSyncing' | 'archiveSettings'>
|
||||
& Pick<TabState, 'canInstall'>;
|
||||
|
||||
const CLEAR_DATE_SEARCH_PARAM = { date: undefined };
|
||||
const CLEAR_CHAT_SEARCH_PARAM = { id: undefined };
|
||||
const WEBK_VERSION_URL = 'https://web.telegram.org/k/';
|
||||
|
||||
const LeftMainHeader: FC<OwnProps & StateProps> = ({
|
||||
@ -140,8 +145,6 @@ const LeftMainHeader: FC<OwnProps & StateProps> = ({
|
||||
const lang = useLang();
|
||||
const { isMobile } = useAppLayout();
|
||||
const hasMenu = content === LeftColumnContent.ChatList;
|
||||
const clearedDateSearchParam = { date: undefined };
|
||||
const clearedChatSearchParam = { id: undefined };
|
||||
const selectedSearchDate = useMemo(() => {
|
||||
return searchDate
|
||||
? formatDateToString(new Date(searchDate * 1000))
|
||||
@ -378,6 +381,32 @@ const LeftMainHeader: FC<OwnProps & StateProps> = ({
|
||||
onSelectArchived, onSelectContacts, onSelectSettings, theme, withOtherVersions, archiveSettings,
|
||||
]);
|
||||
|
||||
const searchContent = useMemo(() => {
|
||||
return (
|
||||
<>
|
||||
{selectedSearchDate && (
|
||||
<PickerSelectedItem
|
||||
icon="calendar"
|
||||
title={selectedSearchDate}
|
||||
canClose
|
||||
isMinimized={Boolean(globalSearchChatId)}
|
||||
className="search-date"
|
||||
onClick={setGlobalSearchDate}
|
||||
clickArg={CLEAR_DATE_SEARCH_PARAM}
|
||||
/>
|
||||
)}
|
||||
{globalSearchChatId && (
|
||||
<PickerSelectedItem
|
||||
chatOrUserId={globalSearchChatId}
|
||||
onClick={setGlobalSearchChatId}
|
||||
canClose
|
||||
clickArg={CLEAR_CHAT_SEARCH_PARAM}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}, [globalSearchChatId, selectedSearchDate]);
|
||||
|
||||
return (
|
||||
<div className="LeftMainHeader">
|
||||
<div id="LeftMainHeader" className="left-header" ref={headerRef}>
|
||||
@ -417,25 +446,7 @@ const LeftMainHeader: FC<OwnProps & StateProps> = ({
|
||||
onFocus={handleSearchFocus}
|
||||
onSpinnerClick={connectionStatusPosition === 'minimized' ? toggleConnectionStatus : undefined}
|
||||
>
|
||||
{selectedSearchDate && (
|
||||
<PickerSelectedItem
|
||||
icon="calendar"
|
||||
title={selectedSearchDate}
|
||||
canClose
|
||||
isMinimized={Boolean(globalSearchChatId)}
|
||||
className="search-date"
|
||||
onClick={setGlobalSearchDate}
|
||||
clickArg={clearedDateSearchParam}
|
||||
/>
|
||||
)}
|
||||
{globalSearchChatId && (
|
||||
<PickerSelectedItem
|
||||
chatOrUserId={globalSearchChatId}
|
||||
onClick={setGlobalSearchChatId}
|
||||
canClose
|
||||
clickArg={clearedChatSearchParam}
|
||||
/>
|
||||
)}
|
||||
{searchContent}
|
||||
</SearchInput>
|
||||
{isCurrentUserPremium && <StatusButton />}
|
||||
{hasPasscode && (
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
import type { OwnProps } from './StatusPickerMenu';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
@ -15,4 +14,4 @@ const StatusPickerMenuAsync: FC<OwnProps> = (props) => {
|
||||
return StatusPickerMenu ? <StatusPickerMenu {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(StatusPickerMenuAsync);
|
||||
export default StatusPickerMenuAsync;
|
||||
|
||||
@ -28,6 +28,7 @@ import { ChatAnimationTypes } from './useChatAnimationType';
|
||||
import MessageSummary from '../../../common/MessageSummary';
|
||||
import ChatForumLastMessage from '../../../common/ChatForumLastMessage';
|
||||
import TypingStatus from '../../../common/TypingStatus';
|
||||
import useLastCallback from '../../../../hooks/useLastCallback';
|
||||
|
||||
const ANIMATION_DURATION = 200;
|
||||
|
||||
@ -89,21 +90,7 @@ export default function useChatListEntry({
|
||||
return actionTargetUserIds.map((userId) => usersById[userId]).filter(Boolean);
|
||||
}, [actionTargetUserIds]);
|
||||
|
||||
function renderSubtitle() {
|
||||
if (chat?.isForum && !isTopic) {
|
||||
return (
|
||||
<ChatForumLastMessage
|
||||
chat={chat}
|
||||
renderLastMessage={renderLastMessageOrTyping}
|
||||
observeIntersection={observeIntersection}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return renderLastMessageOrTyping();
|
||||
}
|
||||
|
||||
function renderLastMessageOrTyping() {
|
||||
const renderLastMessageOrTyping = useLastCallback(() => {
|
||||
if (typingStatus && lastMessage && typingStatus.timestamp > lastMessage.date * 1000) {
|
||||
return <TypingStatus typingStatus={typingStatus} />;
|
||||
}
|
||||
@ -161,6 +148,20 @@ export default function useChatListEntry({
|
||||
{renderSummary(lang, lastMessage, observeIntersection, mediaBlobUrl || mediaThumbnail, isRoundVideo)}
|
||||
</p>
|
||||
);
|
||||
});
|
||||
|
||||
function renderSubtitle() {
|
||||
if (chat?.isForum && !isTopic) {
|
||||
return (
|
||||
<ChatForumLastMessage
|
||||
chat={chat}
|
||||
renderLastMessage={renderLastMessageOrTyping}
|
||||
observeIntersection={observeIntersection}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return renderLastMessageOrTyping();
|
||||
}
|
||||
|
||||
// Sets animation excess values when `orderDiff` changes and then resets excess values to animate
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import type { OwnProps } from './NewChat';
|
||||
@ -14,4 +14,4 @@ const NewChatAsync: FC<OwnProps> = (props) => {
|
||||
return NewChat ? <NewChat {...props} /> : <Loading />;
|
||||
};
|
||||
|
||||
export default memo(NewChatAsync);
|
||||
export default NewChatAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import type { OwnProps } from './NewChatStep1';
|
||||
@ -14,4 +14,4 @@ const NewChatStep1Async: FC<OwnProps> = (props) => {
|
||||
return NewChatStep1 ? <NewChatStep1 {...props} /> : <Loading />;
|
||||
};
|
||||
|
||||
export default memo(NewChatStep1Async);
|
||||
export default NewChatStep1Async;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import type { OwnProps } from './NewChatStep2';
|
||||
@ -14,4 +14,4 @@ const NewChatStep2Async: FC<OwnProps> = (props) => {
|
||||
return NewChatStep2 ? <NewChatStep2 {...props} /> : <Loading />;
|
||||
};
|
||||
|
||||
export default memo(NewChatStep2Async);
|
||||
export default NewChatStep2Async;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
import type { OwnProps } from './LeftSearch';
|
||||
|
||||
@ -13,4 +13,4 @@ const LeftSearchAsync: FC<OwnProps> = (props) => {
|
||||
return LeftSearch ? <LeftSearch {...props} /> : <Loading />;
|
||||
};
|
||||
|
||||
export default memo(LeftSearchAsync);
|
||||
export default LeftSearchAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import type { OwnProps } from './Settings';
|
||||
@ -14,4 +14,4 @@ const SettingsAsync: FC<OwnProps> = (props) => {
|
||||
return Settings ? <Settings {...props} /> : <Loading />;
|
||||
};
|
||||
|
||||
export default memo(SettingsAsync);
|
||||
export default SettingsAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import type { OwnProps } from './AttachBotInstallModal';
|
||||
@ -14,4 +14,4 @@ const AttachBotInstallModalAsync: FC<OwnProps> = (props) => {
|
||||
return AttachBotInstallModal ? <AttachBotInstallModal {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(AttachBotInstallModalAsync);
|
||||
export default AttachBotInstallModalAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
import type { OwnProps } from './AttachBotRecipientPicker';
|
||||
|
||||
@ -15,4 +15,4 @@ const AttachBotRecipientPickerAsync: FC<OwnProps> = (props) => {
|
||||
return AttachBotRecipientPicker ? <AttachBotRecipientPicker {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(AttachBotRecipientPickerAsync);
|
||||
export default AttachBotRecipientPickerAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import type { OwnProps } from './BotTrustModal';
|
||||
@ -14,4 +14,4 @@ const BotTrustModalAsync: FC<OwnProps> = (props) => {
|
||||
return BotTrustModal ? <BotTrustModal {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(BotTrustModalAsync);
|
||||
export default BotTrustModalAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import type { OwnProps } from './DeleteFolderDialog';
|
||||
@ -14,4 +14,4 @@ const DeleteFolderDialogAsync: FC<OwnProps> = (props) => {
|
||||
return DeleteFolderDialog ? <DeleteFolderDialog {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(DeleteFolderDialogAsync);
|
||||
export default DeleteFolderDialogAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
@ -11,4 +11,4 @@ const DialogsAsync: FC = ({ isOpen }) => {
|
||||
return Dialogs ? <Dialogs /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(DialogsAsync);
|
||||
export default DialogsAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
import type { OwnProps } from './DraftRecipientPicker';
|
||||
|
||||
@ -13,4 +13,4 @@ const DraftRecipientPickerAsync: FC<OwnProps> = (props) => {
|
||||
return DraftRecipientPicker ? <DraftRecipientPicker {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(DraftRecipientPickerAsync);
|
||||
export default DraftRecipientPickerAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
import type { OwnProps } from './ForwardRecipientPicker';
|
||||
|
||||
@ -13,4 +13,4 @@ const ForwardRecipientPickerAsync: FC<OwnProps> = (props) => {
|
||||
return ForwardRecipientPicker ? <ForwardRecipientPicker {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(ForwardRecipientPickerAsync);
|
||||
export default ForwardRecipientPickerAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import type { OwnProps } from './HistoryCalendar';
|
||||
@ -14,4 +14,4 @@ const HistoryCalendarAsync: FC<OwnProps> = (props) => {
|
||||
return HistoryCalendar ? <HistoryCalendar {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(HistoryCalendarAsync);
|
||||
export default HistoryCalendarAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import type { OwnProps } from './LockScreen';
|
||||
@ -14,4 +14,4 @@ const LockScreenAsync: FC<OwnProps> = (props) => {
|
||||
return LockScreen ? <LockScreen {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(LockScreenAsync);
|
||||
export default LockScreenAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import type { OwnProps } from './Main';
|
||||
@ -13,4 +13,4 @@ const MainAsync: FC<OwnProps> = (props) => {
|
||||
return Main ? <Main {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(MainAsync);
|
||||
export default MainAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import type { OwnProps } from './NewContactModal';
|
||||
@ -14,4 +14,4 @@ const NewContactModalAsync: FC<OwnProps> = (props) => {
|
||||
return NewContactModal ? <NewContactModal {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(NewContactModalAsync);
|
||||
export default NewContactModalAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
@ -11,4 +11,4 @@ const NotificationsAsync: FC = ({ isOpen }) => {
|
||||
return Notifications ? <Notifications /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(NotificationsAsync);
|
||||
export default NotificationsAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import type { OwnProps } from './SafeLinkModal';
|
||||
@ -14,4 +14,4 @@ const SafeLinkModalAsync: FC<OwnProps> = (props) => {
|
||||
return SafeLinkModal ? <SafeLinkModal {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(SafeLinkModalAsync);
|
||||
export default SafeLinkModalAsync;
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
import type { OwnProps } from './UrlAuthModal';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
@ -14,4 +13,4 @@ const UrlAuthModalAsync: FC<OwnProps> = (props) => {
|
||||
return UrlAuthModal ? <UrlAuthModal {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(UrlAuthModalAsync);
|
||||
export default UrlAuthModalAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import type { OwnProps } from './WebAppModal';
|
||||
@ -14,4 +14,4 @@ const WebAppModalAsync: FC<OwnProps> = (props) => {
|
||||
return WebAppModal ? <WebAppModal {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(WebAppModalAsync);
|
||||
export default WebAppModalAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import type { OwnProps } from './GiftPremiumModal';
|
||||
@ -14,4 +14,4 @@ const GiftPremiumModalAsync: FC<OwnProps> = (props) => {
|
||||
return GiftPremiumModal ? <GiftPremiumModal {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(GiftPremiumModalAsync);
|
||||
export default GiftPremiumModalAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import type { OwnProps } from './PremiumMainModal';
|
||||
@ -14,4 +14,4 @@ const PremiumMainModalAsync: FC<OwnProps> = (props) => {
|
||||
return PremiumMainModal ? <PremiumMainModal {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(PremiumMainModalAsync);
|
||||
export default PremiumMainModalAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../../lib/teact/teact';
|
||||
import React from '../../../../lib/teact/teact';
|
||||
import { Bundles } from '../../../../util/moduleLoader';
|
||||
|
||||
import type { OwnProps } from './PremiumLimitReachedModal';
|
||||
@ -14,4 +14,4 @@ const PremiumLimitReachedModalAsync: FC<OwnProps> = (props) => {
|
||||
return PremiumLimitReachedModal ? <PremiumLimitReachedModal {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(PremiumLimitReachedModalAsync);
|
||||
export default PremiumLimitReachedModalAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
@ -14,4 +14,4 @@ const MediaViewerAsync: FC<OwnProps> = ({ isOpen }) => {
|
||||
return MediaViewer ? <MediaViewer /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(MediaViewerAsync);
|
||||
export default MediaViewerAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import type { OwnProps } from './EmojiInteractionAnimation';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
@ -15,4 +15,4 @@ const EmojiInteractionAnimationAsync: FC<OwnProps> = (props) => {
|
||||
return EmojiInteractionAnimation ? <EmojiInteractionAnimation {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(EmojiInteractionAnimationAsync);
|
||||
export default EmojiInteractionAnimationAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import type { OwnProps } from './HeaderMenuContainer';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const HeaderMenuContainerAsync: FC<OwnProps> = (props) => {
|
||||
return HeaderMenuContainer ? <HeaderMenuContainer {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(HeaderMenuContainerAsync);
|
||||
export default HeaderMenuContainerAsync;
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import type { OwnProps } from './MessageLanguageModal';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
@ -14,4 +13,4 @@ const MessageLanguageModalAsync: FC<OwnProps> = (props) => {
|
||||
return MessageLanguageModal ? <MessageLanguageModal {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(MessageLanguageModalAsync);
|
||||
export default MessageLanguageModalAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
import type { OwnProps } from './MessageSelectToolbar';
|
||||
|
||||
@ -13,4 +13,4 @@ const MessageSelectToolbarAsync: FC<OwnProps> = (props) => {
|
||||
return MessageSelectToolbar ? <MessageSelectToolbar {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(MessageSelectToolbarAsync);
|
||||
export default MessageSelectToolbarAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import type { OwnProps } from './MobileSearch';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const MobileSearchAsync: FC<OwnProps> = (props) => {
|
||||
return MobileSearch ? <MobileSearch {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(MobileSearchAsync);
|
||||
export default MobileSearchAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import type { OwnProps } from './ReactorListModal';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const ReactorListModalAsync: FC<OwnProps> = (props) => {
|
||||
return ReactorListModal ? <ReactorListModal {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(ReactorListModalAsync);
|
||||
export default ReactorListModalAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
import type { OwnProps } from './AttachmentModal';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const AttachmentModalAsync: FC<OwnProps> = (props) => {
|
||||
return AttachmentModal ? <AttachmentModal {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(AttachmentModalAsync);
|
||||
export default AttachmentModalAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
import type { OwnProps } from './BotCommandMenu';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const BotCommandMenuAsync: FC<OwnProps> = (props) => {
|
||||
return BotCommandMenu ? <BotCommandMenu {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(BotCommandMenuAsync);
|
||||
export default BotCommandMenuAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
import type { OwnProps } from './BotCommandTooltip';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const BotCommandTooltipAsync: FC<OwnProps> = (props) => {
|
||||
return BotCommandTooltip ? <BotCommandTooltip {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(BotCommandTooltipAsync);
|
||||
export default BotCommandTooltipAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
import type { OwnProps } from './CustomEmojiTooltip';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const CustomEmojiTooltipAsync: FC<OwnProps> = (props) => {
|
||||
return CustomEmojiTooltip ? <CustomEmojiTooltip {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(CustomEmojiTooltipAsync);
|
||||
export default CustomEmojiTooltipAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
import type { OwnProps } from './CustomSendMenu';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const CustomSendMenuAsync: FC<OwnProps> = (props) => {
|
||||
return CustomSend ? <CustomSend {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(CustomSendMenuAsync);
|
||||
export default CustomSendMenuAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
import type { OwnProps } from './DropArea';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
@ -13,5 +13,5 @@ const DropAreaAsync: FC<OwnProps> = (props) => {
|
||||
return DropArea ? <DropArea {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(DropAreaAsync);
|
||||
export default DropAreaAsync;
|
||||
export { DropAreaState } from './DropArea';
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
import type { OwnProps } from './EmojiTooltip';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const EmojiTooltipAsync: FC<OwnProps> = (props) => {
|
||||
return EmojiTooltip ? <EmojiTooltip {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(EmojiTooltipAsync);
|
||||
export default EmojiTooltipAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
import type { OwnProps } from './InlineBotTooltip';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const InlineBotTooltipAsync: FC<OwnProps> = (props) => {
|
||||
return InlineBotTooltip ? <InlineBotTooltip {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(InlineBotTooltipAsync);
|
||||
export default InlineBotTooltipAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
import type { OwnProps } from './MentionTooltip';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const MentionTooltipAsync: FC<OwnProps> = (props) => {
|
||||
return MentionTooltip ? <MentionTooltip {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(MentionTooltipAsync);
|
||||
export default MentionTooltipAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
import type { OwnProps } from './PollModal';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const PollModalAsync: FC<OwnProps> = (props) => {
|
||||
return PollModal ? <PollModal {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(PollModalAsync);
|
||||
export default PollModalAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
import type { OwnProps } from './SendAsMenu';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const SendAsMenuAsync: FC<OwnProps> = (props) => {
|
||||
return SendAsMenu ? <SendAsMenu {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(SendAsMenuAsync);
|
||||
export default SendAsMenuAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
import type { OwnProps } from './StickerTooltip';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const StickerTooltipAsync: FC<OwnProps> = (props) => {
|
||||
return StickerTooltip ? <StickerTooltip {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(StickerTooltipAsync);
|
||||
export default StickerTooltipAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
import type { OwnProps } from './SymbolMenu';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const SymbolMenuAsync: FC<OwnProps> = (props) => {
|
||||
return SymbolMenu ? <SymbolMenu {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(SymbolMenuAsync);
|
||||
export default SymbolMenuAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
import type { OwnProps } from './TextFormatter';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const TextFormatterAsync: FC<OwnProps> = (props) => {
|
||||
return TextFormatter ? <TextFormatter {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(TextFormatterAsync);
|
||||
export default TextFormatterAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
import type { OwnProps } from './ContextMenuContainer';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const ContextMenuContainerAsync: FC<OwnProps> = (props) => {
|
||||
return ContextMenuContainer ? <ContextMenuContainer {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(ContextMenuContainerAsync);
|
||||
export default ContextMenuContainerAsync;
|
||||
|
||||
@ -1,93 +1,92 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, {
|
||||
memo,
|
||||
useEffect,
|
||||
useMemo,
|
||||
useRef,
|
||||
useState,
|
||||
memo, useEffect, useMemo, useRef, useState,
|
||||
} from '../../../lib/teact/teact';
|
||||
import { getActions, withGlobal } from '../../../global';
|
||||
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import type {
|
||||
ActiveEmojiInteraction, ActiveReaction, ChatTranslatedMessages, MessageListType,
|
||||
ActiveEmojiInteraction,
|
||||
ActiveReaction,
|
||||
ChatTranslatedMessages,
|
||||
MessageListType,
|
||||
} from '../../../global/types';
|
||||
import type {
|
||||
ApiAvailableReaction,
|
||||
ApiChat,
|
||||
ApiChatMember,
|
||||
ApiMessage,
|
||||
ApiMessageOutgoingStatus,
|
||||
ApiUser,
|
||||
ApiChat,
|
||||
ApiThreadInfo,
|
||||
ApiAvailableReaction,
|
||||
ApiChatMember,
|
||||
ApiUsername,
|
||||
ApiTopic,
|
||||
ApiReaction,
|
||||
ApiStickerSet,
|
||||
ApiThreadInfo,
|
||||
ApiTopic,
|
||||
ApiUser,
|
||||
ApiUsername,
|
||||
} from '../../../api/types';
|
||||
import type { FocusDirection, IAlbum, ISettings } from '../../../types';
|
||||
import type { ObserveFn } from '../../../hooks/useIntersectionObserver';
|
||||
import type { PinnedIntersectionChangedCallback } from '../hooks/usePinnedMessage';
|
||||
import { AudioOrigin } from '../../../types';
|
||||
import { MAIN_THREAD_ID } from '../../../api/types';
|
||||
import type { FocusDirection, IAlbum, ISettings } from '../../../types';
|
||||
import { AudioOrigin } from '../../../types';
|
||||
import type { ObserveFn } from '../../../hooks/useIntersectionObserver';
|
||||
import { useOnIntersect } from '../../../hooks/useIntersectionObserver';
|
||||
import type { PinnedIntersectionChangedCallback } from '../hooks/usePinnedMessage';
|
||||
|
||||
import { IS_ANDROID, IS_TOUCH_ENV } from '../../../util/windowEnvironment';
|
||||
import { EMOJI_STATUS_LOOP_LIMIT, GENERAL_TOPIC_ID, IS_ELECTRON } from '../../../config';
|
||||
import {
|
||||
selectChat,
|
||||
selectChatMessage,
|
||||
selectUploadProgress,
|
||||
selectIsChatWithSelf,
|
||||
selectOutgoingStatus,
|
||||
selectUser,
|
||||
selectIsMessageFocused,
|
||||
selectCurrentTextSearch,
|
||||
selectIsInSelectMode,
|
||||
selectIsMessageSelected,
|
||||
selectIsDocumentGroupSelected,
|
||||
selectSender,
|
||||
selectForwardedSender,
|
||||
selectThreadTopMessageId,
|
||||
selectAllowedMessageActions,
|
||||
selectAnimatedEmoji,
|
||||
selectCanAutoLoadMedia,
|
||||
selectCanAutoPlayMedia,
|
||||
selectShouldLoopStickers,
|
||||
selectTheme,
|
||||
selectAllowedMessageActions,
|
||||
selectIsDownloading,
|
||||
selectThreadInfo,
|
||||
selectMessageIdsByGroupId,
|
||||
selectIsMessageProtected,
|
||||
selectDefaultReaction,
|
||||
selectReplySender,
|
||||
selectAnimatedEmoji,
|
||||
selectIsCurrentUserPremium,
|
||||
selectIsChatProtected,
|
||||
selectTopicFromMessage,
|
||||
selectTabState,
|
||||
selectChatTranslations,
|
||||
selectRequestedTranslationLanguage,
|
||||
selectChat,
|
||||
selectChatFullInfo,
|
||||
selectChatMessage,
|
||||
selectChatTranslations,
|
||||
selectCurrentTextSearch,
|
||||
selectDefaultReaction,
|
||||
selectForwardedSender,
|
||||
selectIsChatProtected,
|
||||
selectIsChatWithSelf,
|
||||
selectIsCurrentUserPremium,
|
||||
selectIsDocumentGroupSelected,
|
||||
selectIsDownloading,
|
||||
selectIsInSelectMode,
|
||||
selectIsMessageFocused,
|
||||
selectIsMessageProtected,
|
||||
selectIsMessageSelected,
|
||||
selectMessageIdsByGroupId,
|
||||
selectOutgoingStatus,
|
||||
selectPerformanceSettingsValue,
|
||||
selectReplySender,
|
||||
selectRequestedTranslationLanguage,
|
||||
selectSender,
|
||||
selectShouldLoopStickers,
|
||||
selectTabState,
|
||||
selectTheme,
|
||||
selectThreadInfo,
|
||||
selectThreadTopMessageId,
|
||||
selectTopicFromMessage,
|
||||
selectUploadProgress,
|
||||
selectUser,
|
||||
} from '../../../global/selectors';
|
||||
import {
|
||||
areReactionsEmpty,
|
||||
getMessageContent,
|
||||
isOwnMessage,
|
||||
isReplyMessage,
|
||||
isAnonymousOwnMessage,
|
||||
isMessageLocal,
|
||||
isUserId,
|
||||
isChatWithRepliesBot,
|
||||
getMessageCustomShape,
|
||||
isChatChannel,
|
||||
getMessageHtmlId,
|
||||
getMessageLocation,
|
||||
getMessageSingleCustomEmoji,
|
||||
getMessageSingleRegularEmoji,
|
||||
getSenderTitle,
|
||||
getUserColorKey,
|
||||
areReactionsEmpty,
|
||||
getMessageHtmlId,
|
||||
isGeoLiveExpired,
|
||||
getMessageSingleCustomEmoji,
|
||||
hasMessageText,
|
||||
isAnonymousOwnMessage,
|
||||
isChatChannel,
|
||||
isChatGroup,
|
||||
getMessageLocation,
|
||||
isChatWithRepliesBot,
|
||||
isGeoLiveExpired,
|
||||
isMessageLocal,
|
||||
isOwnMessage,
|
||||
isReplyMessage,
|
||||
isUserId,
|
||||
} from '../../../global/helpers';
|
||||
import buildClassName from '../../../util/buildClassName';
|
||||
import {
|
||||
@ -98,8 +97,8 @@ import {
|
||||
} from '../../common/helpers/mediaDimensions';
|
||||
import { buildContentClassName } from './helpers/buildContentClassName';
|
||||
import {
|
||||
getMinMediaWidth,
|
||||
calculateMediaDimensions,
|
||||
getMinMediaWidth,
|
||||
MIN_MEDIA_WIDTH_WITH_TEXT,
|
||||
} from './helpers/mediaDimensions';
|
||||
import { calculateAlbumLayout } from './helpers/calculateAlbumLayout';
|
||||
@ -112,7 +111,6 @@ import { isAnimatingScroll } from '../../../util/animateScroll';
|
||||
import useLastCallback from '../../../hooks/useLastCallback';
|
||||
import useEnsureMessage from '../../../hooks/useEnsureMessage';
|
||||
import useContextMenuHandlers from '../../../hooks/useContextMenuHandlers';
|
||||
import { useOnIntersect } from '../../../hooks/useIntersectionObserver';
|
||||
import useLang from '../../../hooks/useLang';
|
||||
import useShowTransition from '../../../hooks/useShowTransition';
|
||||
import useFlag from '../../../hooks/useFlag';
|
||||
@ -802,7 +800,7 @@ const Message: FC<OwnProps & StateProps> = ({
|
||||
);
|
||||
}
|
||||
|
||||
function renderQuickReactionButton() {
|
||||
const renderQuickReactionButton = useLastCallback(() => {
|
||||
if (!defaultReaction) return undefined;
|
||||
|
||||
return (
|
||||
@ -819,7 +817,7 @@ const Message: FC<OwnProps & StateProps> = ({
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
function renderReactionsAndMeta() {
|
||||
const meta = (
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
import type { OwnProps } from './ReactionPicker';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
@ -18,4 +17,4 @@ const ReactionPickerAsync: FC<OwnProps & LocalOwnProps> = (props) => {
|
||||
return ReactionPicker ? <ReactionPicker {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(ReactionPickerAsync);
|
||||
export default ReactionPickerAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
import type { OwnProps } from './SponsoredMessageContextMenuContainer';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
@ -15,4 +15,4 @@ const SponsoredMessageContextMenuContainerAsync: FC<OwnProps> = (props) => {
|
||||
return SponsoredMessageContextMenuContainer ? <SponsoredMessageContextMenuContainer {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(SponsoredMessageContextMenuContainerAsync);
|
||||
export default SponsoredMessageContextMenuContainerAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import type { OwnProps } from './ChatlistModal';
|
||||
@ -14,4 +14,4 @@ const ChatlistModalAsync: FC<OwnProps> = (props) => {
|
||||
return ChatlistModal ? <ChatlistModal {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(ChatlistModalAsync);
|
||||
export default ChatlistModalAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import type { OwnProps } from './PaymentModal';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const PaymentModalAsync: FC<OwnProps> = (props) => {
|
||||
return PaymentModal ? <PaymentModal {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(PaymentModalAsync);
|
||||
export default PaymentModalAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import type { OwnProps } from './ReceiptModal';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const ReceiptModalAsync: FC<OwnProps> = (props) => {
|
||||
return ReceiptModal ? <ReceiptModal {...props} /> : undefined;
|
||||
};
|
||||
|
||||
export default memo(ReceiptModalAsync);
|
||||
export default ReceiptModalAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import type { OwnProps } from './CreateTopic';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const CreateTopicAsync: FC<OwnProps> = (props) => {
|
||||
return CreateTopic ? <CreateTopic {...props} /> : <Loading />;
|
||||
};
|
||||
|
||||
export default memo(CreateTopicAsync);
|
||||
export default CreateTopicAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import type { OwnProps } from './EditTopic';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const EditTopicAsync: FC<OwnProps> = (props) => {
|
||||
return EditTopic ? <EditTopic {...props} /> : <Loading />;
|
||||
};
|
||||
|
||||
export default memo(EditTopicAsync);
|
||||
export default EditTopicAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
@ -12,4 +12,4 @@ const GifSearchAsync: FC = () => {
|
||||
return GifSearch ? <GifSearch /> : <Loading />;
|
||||
};
|
||||
|
||||
export default memo(GifSearchAsync);
|
||||
export default GifSearchAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
@ -11,4 +11,4 @@ const PollResultsAsync: FC = () => {
|
||||
return PollResults ? <PollResults /> : <Loading />;
|
||||
};
|
||||
|
||||
export default memo(PollResultsAsync);
|
||||
export default PollResultsAsync;
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, {
|
||||
memo, useEffect, useState, useRef,
|
||||
} from '../../lib/teact/teact';
|
||||
import React, { useEffect, useRef, useState } from '../../lib/teact/teact';
|
||||
import { getActions, withGlobal } from '../../global';
|
||||
|
||||
import type { ApiExportedInvite } from '../../api/types';
|
||||
import { ManagementScreens, ProfileState } from '../../types';
|
||||
import { MAIN_THREAD_ID } from '../../api/types';
|
||||
import { ManagementScreens, ProfileState } from '../../types';
|
||||
|
||||
import { ANIMATION_END_DELAY } from '../../config';
|
||||
import { debounce } from '../../util/schedulers';
|
||||
@ -544,7 +542,7 @@ const RightHeader: FC<OwnProps & StateProps> = ({
|
||||
);
|
||||
};
|
||||
|
||||
export default memo(withGlobal<OwnProps>(
|
||||
export default withGlobal<OwnProps>(
|
||||
(global, {
|
||||
chatId, isProfile, isManagement, threadId,
|
||||
}): StateProps => {
|
||||
@ -587,4 +585,4 @@ export default memo(withGlobal<OwnProps>(
|
||||
shouldSkipHistoryAnimations: tabState.shouldSkipHistoryAnimations,
|
||||
};
|
||||
},
|
||||
)(RightHeader));
|
||||
)(RightHeader);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import type { OwnProps } from './RightSearch';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
@ -13,4 +13,4 @@ const RightSearchAsync: FC<OwnProps> = (props) => {
|
||||
return RightSearch ? <RightSearch {...props} /> : <Loading />;
|
||||
};
|
||||
|
||||
export default memo(RightSearchAsync);
|
||||
export default RightSearchAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
@ -12,4 +12,4 @@ const StickerSearchAsync: FC = () => {
|
||||
return StickerSearch ? <StickerSearch /> : <Loading />;
|
||||
};
|
||||
|
||||
export default memo(StickerSearchAsync);
|
||||
export default StickerSearchAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import React from '../../../lib/teact/teact';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import type { OwnProps } from './Management';
|
||||
@ -15,4 +15,4 @@ const ManagementAsync: FC<OwnProps> = (props) => {
|
||||
return Management ? <Management {...props} /> : <Loading />;
|
||||
};
|
||||
|
||||
export default memo(ManagementAsync);
|
||||
export default ManagementAsync;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { useRef, memo } from '../../lib/teact/teact';
|
||||
import React, { useRef } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps as ButtonProps } from './Button';
|
||||
|
||||
@ -65,4 +65,4 @@ const ResponsiveHoverButton: FC<OwnProps> = ({ onActivate, ...buttonProps }) =>
|
||||
);
|
||||
};
|
||||
|
||||
export default memo(ResponsiveHoverButton);
|
||||
export default ResponsiveHoverButton;
|
||||
|
||||
@ -1,12 +1,6 @@
|
||||
import React, {
|
||||
useRef,
|
||||
memo,
|
||||
useEffect,
|
||||
useLayoutEffect,
|
||||
} from '../../lib/teact/teact';
|
||||
import { requestForcedReflow, requestMutation } from '../../lib/fasterdom/fasterdom';
|
||||
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { useEffect, useLayoutEffect, useRef } from '../../lib/teact/teact';
|
||||
import { requestForcedReflow, requestMutation } from '../../lib/fasterdom/fasterdom';
|
||||
import type { MenuItemContextAction } from './ListItem';
|
||||
|
||||
import { MouseButton } from '../../util/windowEnvironment';
|
||||
@ -16,13 +10,13 @@ import renderText from '../common/helpers/renderText';
|
||||
import useMenuPosition from '../../hooks/useMenuPosition';
|
||||
import useContextMenuHandlers from '../../hooks/useContextMenuHandlers';
|
||||
import { useFastClick } from '../../hooks/useFastClick';
|
||||
import useLastCallback from '../../hooks/useLastCallback';
|
||||
|
||||
import Menu from './Menu';
|
||||
import MenuItem from './MenuItem';
|
||||
|
||||
import MenuSeparator from './MenuSeparator';
|
||||
|
||||
import './Tab.scss';
|
||||
import useLastCallback from '../../hooks/useLastCallback';
|
||||
|
||||
type OwnProps = {
|
||||
className?: string;
|
||||
@ -197,4 +191,4 @@ const Tab: FC<OwnProps> = ({
|
||||
);
|
||||
};
|
||||
|
||||
export default memo(Tab);
|
||||
export default Tab;
|
||||
|
||||
@ -801,7 +801,7 @@ export function useMemo<T extends any>(resolver: () => T, dependencies: any[], d
|
||||
if (
|
||||
DEBUG_state.calls % 10 === 0
|
||||
&& DEBUG_state.calls >= DEBUG_MEMOS_CALLS_THRESHOLD
|
||||
&& DEBUG_state.hitRate < 0.5
|
||||
&& DEBUG_state.hitRate < 0.25
|
||||
) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user