Migrate some components from FC (#6543)
This commit is contained in:
parent
41c2a17fdc
commit
a6b913c49e
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
import Loading from '../ui/Loading';
|
||||
|
||||
const AuthCodeAsync: FC = () => {
|
||||
const AuthCodeAsync = () => {
|
||||
const AuthCode = useModuleLoader(Bundles.Auth, 'AuthCode');
|
||||
|
||||
return AuthCode ? <AuthCode /> : <Loading />;
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
import Loading from '../ui/Loading';
|
||||
|
||||
const AuthPasswordAsync: FC = () => {
|
||||
const AuthPasswordAsync = () => {
|
||||
const AuthPassword = useModuleLoader(Bundles.Auth, 'AuthPassword');
|
||||
|
||||
return AuthPassword ? <AuthPassword /> : <Loading />;
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
import Loading from '../ui/Loading';
|
||||
|
||||
const AuthRegisterAsync: FC = () => {
|
||||
const AuthRegisterAsync = () => {
|
||||
const AuthRegister = useModuleLoader(Bundles.Auth, 'AuthRegister');
|
||||
|
||||
return AuthRegister ? <AuthRegister /> : <Loading />;
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
@ -8,7 +6,7 @@ type OwnProps = {
|
||||
isActive?: boolean;
|
||||
};
|
||||
|
||||
const ActiveCallHeaderAsync: FC<OwnProps> = (props) => {
|
||||
const ActiveCallHeaderAsync = (props: OwnProps) => {
|
||||
const { isActive } = props;
|
||||
const ActiveCallHeader = useModuleLoader(Bundles.Calls, 'ActiveCallHeader', !isActive);
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import { memo, useEffect } from '../../lib/teact/teact';
|
||||
import { getActions, withGlobal } from '../../global';
|
||||
|
||||
@ -18,11 +17,11 @@ type StateProps = {
|
||||
phoneCallUser?: ApiUser;
|
||||
};
|
||||
|
||||
const ActiveCallHeader: FC<StateProps> = ({
|
||||
const ActiveCallHeader = ({
|
||||
groupCall,
|
||||
phoneCallUser,
|
||||
isCallPanelVisible,
|
||||
}) => {
|
||||
}: StateProps) => {
|
||||
const { toggleGroupCallPanel } = getActions();
|
||||
|
||||
const lang = useOldLang();
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './GroupCall';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const GroupCallAsync: FC<OwnProps> = (props) => {
|
||||
const GroupCallAsync = (props: OwnProps) => {
|
||||
const { groupCallId } = props;
|
||||
const GroupCall = useModuleLoader(Bundles.Calls, 'GroupCall', !groupCallId);
|
||||
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
@ -8,7 +6,7 @@ type OwnProps = {
|
||||
isActive?: boolean;
|
||||
};
|
||||
|
||||
const PhoneCallAsync: FC<OwnProps> = (props) => {
|
||||
const PhoneCallAsync = (props: OwnProps) => {
|
||||
const { isActive } = props;
|
||||
const PhoneCall = useModuleLoader(Bundles.Calls, 'PhoneCall', !isActive);
|
||||
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import '../../../global/actions/calls';
|
||||
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import {
|
||||
memo, useCallback, useEffect, useMemo, useRef,
|
||||
} from '../../../lib/teact/teact';
|
||||
@ -45,12 +44,12 @@ type StateProps = {
|
||||
isCallPanelVisible?: boolean;
|
||||
};
|
||||
|
||||
const PhoneCall: FC<StateProps> = ({
|
||||
const PhoneCall = ({
|
||||
user,
|
||||
isOutgoing,
|
||||
phoneCall,
|
||||
isCallPanelVisible,
|
||||
}) => {
|
||||
}: StateProps) => {
|
||||
const lang = useOldLang();
|
||||
const {
|
||||
hangUp, requestMasterAndAcceptCall, playGroupCallSound, toggleGroupCallPanel, connectToActivePhoneCall,
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './RatePhoneCallModal';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const RatePhoneCallModalAsync: FC<OwnProps> = (props) => {
|
||||
const RatePhoneCallModalAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const RatePhoneCallModal = useModuleLoader(Bundles.Calls, 'RatePhoneCallModal', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './AboutMonetizationModal';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
const AboutMonetizationModalAsync: FC<OwnProps> = (props) => {
|
||||
const AboutMonetizationModalAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const AboutMonetizationModal = useModuleLoader(Bundles.Extra, 'AboutMonetizationModal', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './CalendarModal';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
const CalendarModalAsync: FC<OwnProps> = (props) => {
|
||||
const CalendarModalAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const CalendarModal = useModuleLoader(Bundles.Extra, 'CalendarModal', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './CountryPickerModal';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
const CountryPickerModalAsync: FC<OwnProps> = (props) => {
|
||||
const CountryPickerModalAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const CountryPickerModal = useModuleLoader(Bundles.Extra, 'CountryPickerModal', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './CustomEmojiSetsModal';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
const CustomEmojiSetsModalAsync: FC<OwnProps> = (props) => {
|
||||
const CustomEmojiSetsModalAsync = (props: OwnProps) => {
|
||||
const { customEmojiSetIds } = props;
|
||||
const CustomEmojiSetsModal = useModuleLoader(Bundles.Extra, 'CustomEmojiSetsModal', !customEmojiSetIds);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './DeleteMessageModal';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
const DeleteMessageModalAsync: FC<OwnProps> = (props) => {
|
||||
const DeleteMessageModalAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const DeleteMessageModal = useModuleLoader(Bundles.Extra, 'DeleteMessageModal', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './PinMessageModal';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
const PinMessageModalAsync: FC<OwnProps> = (props) => {
|
||||
const PinMessageModalAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const PinMessageModal = useModuleLoader(Bundles.Extra, 'PinMessageModal', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './PrivacySettingsNoticeModal';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
const PrivacySettingsNoticeModalAsync: FC<OwnProps> = (props) => {
|
||||
const PrivacySettingsNoticeModalAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const PrivacySettingsNoticeModal = useModuleLoader(Bundles.Extra, 'PrivacySettingsNoticeModal', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './SeenByModal';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
const SeenByModalAsync: FC<OwnProps> = (props) => {
|
||||
const SeenByModalAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const SeenByModal = useModuleLoader(Bundles.Extra, 'SeenByModal', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './StickerSetModal';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
const StickerSetModalAsync: FC<OwnProps> = (props) => {
|
||||
const StickerSetModalAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const StickerSetModal = useModuleLoader(Bundles.Extra, 'StickerSetModal', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './UnpinAllMessagesModal';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
const UnpinAllMessagesModalAsync: FC<OwnProps> = (props) => {
|
||||
const UnpinAllMessagesModalAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const UnpinAllMessagesModal = useModuleLoader(Bundles.Extra, 'UnpinAllMessagesModal', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './VerificationMonetizationModal';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
const VerificationMonetizationModalAsync: FC<OwnProps> = (props) => {
|
||||
const VerificationMonetizationModalAsync = (props: OwnProps) => {
|
||||
const { modal } = props;
|
||||
const VerificationMonetizationModal = useModuleLoader(Bundles.Extra, 'VerificationMonetizationModal', !modal);
|
||||
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './ArchivedChats';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
@ -8,7 +6,7 @@ import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
import Loading from '../ui/Loading';
|
||||
|
||||
const ArchivedChatsAsync: FC<OwnProps> = (props) => {
|
||||
const ArchivedChatsAsync = (props: OwnProps) => {
|
||||
const ArchivedChats = useModuleLoader(Bundles.Extra, 'ArchivedChats');
|
||||
|
||||
return ArchivedChats ? <ArchivedChats {...props} /> : <Loading />;
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './ChatFolderModal';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
const ChatFolderModalAsync: FC<OwnProps> = (props) => {
|
||||
const ChatFolderModalAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const ChatFolderModal = useModuleLoader(Bundles.Extra, 'ChatFolderModal', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './MuteChatModal';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
const MuteChatModalAsync: FC<OwnProps> = (props) => {
|
||||
const MuteChatModalAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const MuteChatModal = useModuleLoader(Bundles.Extra, 'MuteChatModal', !isOpen);
|
||||
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './ContactList';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
@ -8,7 +6,7 @@ import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
import Loading from '../../ui/Loading';
|
||||
|
||||
const ContactListAsync: FC<OwnProps> = (props) => {
|
||||
const ContactListAsync = (props: OwnProps) => {
|
||||
const ContactList = useModuleLoader(Bundles.Extra, 'ContactList');
|
||||
|
||||
return ContactList ? <ContactList {...props} /> : <Loading />;
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import { memo, useCallback, useRef } from '../../../lib/teact/teact';
|
||||
import { getActions, withGlobal } from '../../../global';
|
||||
|
||||
@ -29,7 +28,7 @@ interface StateProps {
|
||||
const EFFECT_DURATION_MS = 1500;
|
||||
const EMOJI_STATUS_SIZE = 24;
|
||||
|
||||
const StatusButton: FC<StateProps> = ({ emojiStatus, collectibleStatuses, isAccountFrozen }) => {
|
||||
const StatusButton = ({ emojiStatus, collectibleStatuses, isAccountFrozen }: StateProps) => {
|
||||
const { setEmojiStatus, loadCurrentUser, openFrozenAccountModal } = getActions();
|
||||
|
||||
const buttonRef = useRef<HTMLButtonElement>();
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './StatusPickerMenu';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const StatusPickerMenuAsync: FC<OwnProps> = (props) => {
|
||||
const StatusPickerMenuAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const StatusPickerMenu = useModuleLoader(Bundles.Extra, 'StatusPickerMenu', !isOpen);
|
||||
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './NewChat';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
@ -8,7 +6,7 @@ import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
import Loading from '../../ui/Loading';
|
||||
|
||||
const NewChatAsync: FC<OwnProps> = (props) => {
|
||||
const NewChatAsync = (props: OwnProps) => {
|
||||
const NewChat = useModuleLoader(Bundles.Extra, 'NewChat');
|
||||
|
||||
return NewChat ? <NewChat {...props} /> : <Loading />;
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './LeftSearch';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
@ -8,7 +6,7 @@ import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
import Loading from '../../ui/Loading';
|
||||
|
||||
const LeftSearchAsync: FC<OwnProps> = (props) => {
|
||||
const LeftSearchAsync = (props: OwnProps) => {
|
||||
const LeftSearch = useModuleLoader(Bundles.Extra, 'LeftSearch');
|
||||
|
||||
return LeftSearch ? <LeftSearch {...props} /> : <Loading />;
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './Settings';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
@ -8,7 +6,7 @@ import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
import Loading from '../../ui/Loading';
|
||||
|
||||
const SettingsAsync: FC<OwnProps> = (props) => {
|
||||
const SettingsAsync = (props: OwnProps) => {
|
||||
const Settings = useModuleLoader(Bundles.Extra, 'Settings');
|
||||
|
||||
return Settings ? <Settings {...props} /> : <Loading />;
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './AttachBotRecipientPicker';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
const AttachBotRecipientPickerAsync: FC<OwnProps> = (props) => {
|
||||
const AttachBotRecipientPickerAsync = (props: OwnProps) => {
|
||||
const { requestedAttachBotInChat } = props;
|
||||
const AttachBotRecipientPicker = useModuleLoader(
|
||||
Bundles.Extra, 'AttachBotRecipientPicker', !requestedAttachBotInChat,
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './BotTrustModal';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
const BotTrustModalAsync: FC<OwnProps> = (props) => {
|
||||
const BotTrustModalAsync = (props: OwnProps) => {
|
||||
const { bot } = props;
|
||||
const BotTrustModal = useModuleLoader(Bundles.Extra, 'BotTrustModal', !bot);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './DeleteFolderDialog';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
const DeleteFolderDialogAsync: FC<OwnProps> = (props) => {
|
||||
const DeleteFolderDialogAsync = (props: OwnProps) => {
|
||||
const { folder } = props;
|
||||
const DeleteFolderDialog = useModuleLoader(Bundles.Extra, 'DeleteFolderDialog', !folder);
|
||||
|
||||
|
||||
@ -1,13 +0,0 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
const DialogsAsync: FC = ({ isOpen }) => {
|
||||
const Dialogs = useModuleLoader(Bundles.Extra, 'Dialogs', !isOpen);
|
||||
|
||||
return Dialogs ? <Dialogs /> : undefined;
|
||||
};
|
||||
|
||||
export default DialogsAsync;
|
||||
@ -1,4 +1,3 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import { memo, useEffect } from '../../lib/teact/teact';
|
||||
import { getActions, withGlobal } from '../../global';
|
||||
|
||||
@ -22,7 +21,7 @@ type StateProps = {
|
||||
dialogs: (ApiError | ApiContact)[];
|
||||
};
|
||||
|
||||
const Dialogs: FC<StateProps> = ({ dialogs, currentMessageList }) => {
|
||||
const Dialogs = ({ dialogs, currentMessageList }: StateProps) => {
|
||||
const {
|
||||
dismissDialog,
|
||||
sendMessage,
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import { memo, useEffect } from '../../lib/teact/teact';
|
||||
import { getActions, getGlobal, withGlobal } from '../../global';
|
||||
|
||||
@ -23,9 +22,9 @@ const GLOBAL_UPDATE_DEBOUNCE = 1000;
|
||||
const processedHashes = new Set<string>();
|
||||
const downloadedHashes = new Set<string>();
|
||||
|
||||
const DownloadManager: FC<StateProps> = ({
|
||||
const DownloadManager = ({
|
||||
activeDownloads,
|
||||
}) => {
|
||||
}: StateProps) => {
|
||||
const { cancelMediaHashDownloads, showNotification } = getActions();
|
||||
|
||||
const runDebounced = useRunDebounced(GLOBAL_UPDATE_DEBOUNCE, true);
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './DraftRecipientPicker';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
const DraftRecipientPickerAsync: FC<OwnProps> = (props) => {
|
||||
const DraftRecipientPickerAsync = (props: OwnProps) => {
|
||||
const { requestedDraft } = props;
|
||||
const DraftRecipientPicker = useModuleLoader(Bundles.Extra, 'DraftRecipientPicker', !requestedDraft);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './ForwardRecipientPicker';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
const ForwardRecipientPickerAsync: FC<OwnProps> = (props) => {
|
||||
const ForwardRecipientPickerAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const ForwardRecipientPicker = useModuleLoader(Bundles.Extra, 'ForwardRecipientPicker', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './HistoryCalendar';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
const HistoryCalendarAsync: FC<OwnProps> = (props) => {
|
||||
const HistoryCalendarAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const HistoryCalendar = useModuleLoader(Bundles.Extra, 'HistoryCalendar', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './LockScreen';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
const LockScreenAsync: FC<OwnProps> = (props) => {
|
||||
const LockScreenAsync = (props: OwnProps) => {
|
||||
const { isLocked } = props;
|
||||
const LockScreen = useModuleLoader(Bundles.Main, 'LockScreen', !isLocked);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './Main';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
const MainAsync: FC<OwnProps> = (props) => {
|
||||
const MainAsync = (props: OwnProps) => {
|
||||
const Main = useModuleLoader(Bundles.Main, 'Main');
|
||||
|
||||
return Main ? <Main {...props} /> : undefined;
|
||||
|
||||
@ -77,7 +77,7 @@ import StoryViewer from '../story/StoryViewer.async';
|
||||
import AttachBotRecipientPicker from './AttachBotRecipientPicker.async';
|
||||
import BotTrustModal from './BotTrustModal.async';
|
||||
import DeleteFolderDialog from './DeleteFolderDialog.async';
|
||||
import Dialogs from './Dialogs.async';
|
||||
import Dialogs from './Dialogs';
|
||||
import DownloadManager from './DownloadManager';
|
||||
import DraftRecipientPicker from './DraftRecipientPicker.async';
|
||||
import FoldersSidebar from './FoldersSidebar';
|
||||
@ -109,7 +109,6 @@ type StateProps = {
|
||||
isMediaViewerOpen: boolean;
|
||||
isStoryViewerOpen: boolean;
|
||||
isForwardModalOpen: boolean;
|
||||
hasDialogs: boolean;
|
||||
safeLinkModalUrl?: string;
|
||||
isHistoryCalendarOpen: boolean;
|
||||
shouldSkipHistoryAnimations?: boolean;
|
||||
@ -161,7 +160,6 @@ const Main = ({
|
||||
isMediaViewerOpen,
|
||||
isStoryViewerOpen,
|
||||
isForwardModalOpen,
|
||||
hasDialogs,
|
||||
activeGroupCallId,
|
||||
safeLinkModalUrl,
|
||||
isHistoryCalendarOpen,
|
||||
@ -561,7 +559,7 @@ const Main = ({
|
||||
<StoryViewer isOpen={isStoryViewerOpen} />
|
||||
<ForwardRecipientPicker isOpen={isForwardModalOpen} />
|
||||
<DraftRecipientPicker requestedDraft={requestedDraft} />
|
||||
<Dialogs isOpen={hasDialogs} />
|
||||
<Dialogs />
|
||||
<AudioPlayer noUi />
|
||||
<ModalContainer />
|
||||
<SafeLinkModal url={safeLinkModalUrl} />
|
||||
@ -627,7 +625,6 @@ export default memo(withGlobal<OwnProps>(
|
||||
openedGame,
|
||||
isLeftColumnShown,
|
||||
historyCalendarSelectedAt,
|
||||
dialogs,
|
||||
newContact,
|
||||
ratingPhoneCall,
|
||||
premiumModal,
|
||||
@ -660,7 +657,6 @@ export default memo(withGlobal<OwnProps>(
|
||||
isStoryViewerOpen: selectIsStoryViewerOpen(global),
|
||||
isForwardModalOpen: selectIsForwardModalOpen(global),
|
||||
isReactionPickerOpen: selectIsReactionPickerOpen(global),
|
||||
hasDialogs: Boolean(dialogs.length),
|
||||
safeLinkModalUrl,
|
||||
isHistoryCalendarOpen: Boolean(historyCalendarSelectedAt),
|
||||
shouldSkipHistoryAnimations,
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './NewContactModal';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
const NewContactModalAsync: FC<OwnProps> = (props) => {
|
||||
const NewContactModalAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const NewContactModal = useModuleLoader(Bundles.Extra, 'NewContactModal', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './SafeLinkModal';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
const SafeLinkModalAsync: FC<OwnProps> = (props) => {
|
||||
const SafeLinkModalAsync = (props: OwnProps) => {
|
||||
const { url } = props;
|
||||
const SafeLinkModal = useModuleLoader(Bundles.Extra, 'SafeLinkModal', !url);
|
||||
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import type { OwnProps } from './WebAppsCloseConfirmationModal';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
const WebAppsCloseConfirmationModalAsync: FC = (props) => {
|
||||
const WebAppsCloseConfirmationModalAsync = (props: OwnProps) => {
|
||||
const { modal } = props;
|
||||
const WebAppsCloseConfirmationModal = useModuleLoader(Bundles.Extra, 'WebAppsCloseConfirmationModal', !modal);
|
||||
|
||||
return WebAppsCloseConfirmationModal ? <WebAppsCloseConfirmationModal isOpen={modal} /> : undefined;
|
||||
return WebAppsCloseConfirmationModal ? <WebAppsCloseConfirmationModal modal={modal} /> : undefined;
|
||||
};
|
||||
|
||||
export default WebAppsCloseConfirmationModalAsync;
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import {
|
||||
memo, useCallback, useRef, useState,
|
||||
} from '../../lib/teact/teact';
|
||||
import { getActions } from '../../global';
|
||||
|
||||
import type { TabState } from '../../global/types';
|
||||
|
||||
import buildClassName from '../../util/buildClassName';
|
||||
|
||||
import useKeyboardListNavigation from '../../hooks/useKeyboardListNavigation';
|
||||
@ -14,16 +15,19 @@ import Button from '../ui/Button';
|
||||
import Checkbox from '../ui/Checkbox';
|
||||
import Modal from '../ui/Modal';
|
||||
|
||||
type OwnProps = {
|
||||
isOpen: boolean;
|
||||
export type OwnProps = {
|
||||
modal: TabState['isWebAppsCloseConfirmationModalOpen'];
|
||||
};
|
||||
|
||||
const WebAppsCloseConfirmationModal: FC<OwnProps> = ({
|
||||
isOpen,
|
||||
}) => {
|
||||
const WebAppsCloseConfirmationModal = ({
|
||||
modal,
|
||||
}: OwnProps) => {
|
||||
const { closeWebAppsCloseConfirmationModal, closeWebAppModal } = getActions();
|
||||
|
||||
const oldLang = useOldLang();
|
||||
const lang = useLang();
|
||||
const { closeWebAppsCloseConfirmationModal, closeWebAppModal } = getActions();
|
||||
|
||||
const isOpen = Boolean(modal);
|
||||
|
||||
const [shouldSkipInFuture, setShouldSkipInFuture] = useState(false);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './GiveawayModal';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const GiveawayModalAsync: FC<OwnProps> = (props) => {
|
||||
const GiveawayModalAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const GiveawayModal = useModuleLoader(Bundles.Extra, 'GiveawayModal', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './PremiumMainModal';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const PremiumMainModalAsync: FC<OwnProps> = (props) => {
|
||||
const PremiumMainModalAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const PremiumMainModal = useModuleLoader(Bundles.Extra, 'PremiumMainModal', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './StarsGiftingPickerModal';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const StarsGiftingPickerModalAsync: FC<OwnProps> = (props) => {
|
||||
const StarsGiftingPickerModalAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const StarsGiftingPickerModal = useModuleLoader(Bundles.Stars, 'StarsGiftingPickerModal', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './PremiumLimitReachedModal';
|
||||
|
||||
import { Bundles } from '../../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../../hooks/useModuleLoader';
|
||||
|
||||
const PremiumLimitReachedModalAsync: FC<OwnProps> = (props) => {
|
||||
const PremiumLimitReachedModalAsync = (props: OwnProps) => {
|
||||
const { limit } = props;
|
||||
const PremiumLimitReachedModal = useModuleLoader(Bundles.Extra, 'PremiumLimitReachedModal', !limit);
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import type { FC } from '../../../../lib/teact/teact';
|
||||
import {
|
||||
memo, useEffect, useRef, useState,
|
||||
} from '../../../../lib/teact/teact';
|
||||
@ -25,24 +24,26 @@ type StateProps = {
|
||||
stickers: GlobalState['stickers']['premium']['stickers'];
|
||||
};
|
||||
|
||||
const EMOJI_SIZE_MULTIPLIER = 0.6;
|
||||
const EFFECT_SIZE_MULTIPLIER = 0.8;
|
||||
const MAX_EMOJIS = 15;
|
||||
const ENDED_DELAY = 150;
|
||||
|
||||
const AnimatedCircleSticker: FC<{
|
||||
type StickerProps = {
|
||||
size: number;
|
||||
realIndex: number;
|
||||
sticker: ApiSticker;
|
||||
index: number;
|
||||
maxLength: number;
|
||||
canPlay: boolean;
|
||||
onClick: (index: number) => void;
|
||||
onEnded: (index: number) => void;
|
||||
canPlay: boolean;
|
||||
}> = ({
|
||||
};
|
||||
|
||||
const EMOJI_SIZE_MULTIPLIER = 0.6;
|
||||
const EFFECT_SIZE_MULTIPLIER = 0.8;
|
||||
const MAX_EMOJIS = 15;
|
||||
const ENDED_DELAY = 150;
|
||||
|
||||
const AnimatedCircleSticker = ({
|
||||
size, realIndex, canPlay,
|
||||
sticker, index, maxLength, onClick, onEnded,
|
||||
}) => {
|
||||
}: StickerProps) => {
|
||||
const mediaData = useMedia(`sticker${sticker.id}`);
|
||||
const mediaDataAround = useMedia(`sticker${sticker.id}?size=f`);
|
||||
|
||||
@ -103,9 +104,9 @@ const AnimatedCircleSticker: FC<{
|
||||
);
|
||||
};
|
||||
|
||||
const PremiumFeaturePreviewStickers: FC<OwnProps & StateProps> = ({
|
||||
const PremiumFeaturePreviewStickers = ({
|
||||
stickers, isActive,
|
||||
}) => {
|
||||
}: OwnProps & StateProps) => {
|
||||
const containerRef = useRef<HTMLDivElement>();
|
||||
const [offset, setOffset] = useState(0);
|
||||
const [size, setSize] = useState(0);
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './ChatLanguageModal';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
const ChatLanguageModalAsync: FC<OwnProps> = (props) => {
|
||||
const ChatLanguageModalAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const ChatLanguageModal = useModuleLoader(Bundles.Extra, 'ChatLanguageModal', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './EmojiInteractionAnimation';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
const EmojiInteractionAnimationAsync: FC<OwnProps> = (props) => {
|
||||
const EmojiInteractionAnimationAsync = (props: OwnProps) => {
|
||||
const { activeEmojiInteraction } = props;
|
||||
const EmojiInteractionAnimation = useModuleLoader(
|
||||
Bundles.Extra, 'EmojiInteractionAnimation', !activeEmojiInteraction,
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './HeaderMenuContainer';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
const HeaderMenuContainerAsync: FC<OwnProps> = (props) => {
|
||||
const HeaderMenuContainerAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const HeaderMenuContainer = useModuleLoader(Bundles.Extra, 'HeaderMenuContainer', !isOpen);
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import { memo } from '../../lib/teact/teact';
|
||||
import { getActions, withGlobal } from '../../global';
|
||||
|
||||
@ -15,35 +14,38 @@ type StateProps = {
|
||||
|
||||
// Actual `MessageList` components are unmounted when deep in the history,
|
||||
// so we need a separate component just for handling history
|
||||
const MessageListHistoryHandler: FC<StateProps> = ({ messageLists }) => {
|
||||
const MessageListHistoryHandler = ({ messageLists }: StateProps) => {
|
||||
const { openChat } = getActions();
|
||||
|
||||
const closeChat = () => {
|
||||
openChat({ id: undefined }, { forceSyncOnIOs: true });
|
||||
};
|
||||
|
||||
const MessageHistoryRecord: FC<GlobalMessageList> = ({ chatId, type, threadId }) => {
|
||||
useHistoryBack({
|
||||
isActive: true,
|
||||
hash: createLocationHash(chatId, type, threadId),
|
||||
onBack: closeChat,
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
{messageLists?.map((messageList, i) => (
|
||||
<MessageHistoryRecord
|
||||
|
||||
key={`${messageList.chatId}_${messageList.threadId}_${messageList.type}_${i}`}
|
||||
|
||||
{...messageList}
|
||||
onBack={closeChat}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const MessageHistoryRecord = ({
|
||||
chatId, type, threadId, onBack,
|
||||
}: GlobalMessageList & { onBack: NoneToVoidFunction }) => {
|
||||
useHistoryBack({
|
||||
isActive: true,
|
||||
hash: createLocationHash(chatId, type, threadId),
|
||||
onBack,
|
||||
});
|
||||
|
||||
return undefined;
|
||||
};
|
||||
|
||||
export default memo(withGlobal(
|
||||
(global): Complete<StateProps> => {
|
||||
return {
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './MessageSelectToolbar';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
const MessageSelectToolbarAsync: FC<OwnProps> = (props) => {
|
||||
const MessageSelectToolbarAsync = (props: OwnProps) => {
|
||||
const { isActive } = props;
|
||||
const MessageSelectToolbar = useModuleLoader(Bundles.Extra, 'MessageSelectToolbar', !isActive);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './ReactorListModal';
|
||||
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
||||
const ReactorListModalAsync: FC<OwnProps> = (props) => {
|
||||
const ReactorListModalAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const ReactorListModal = useModuleLoader(Bundles.Extra, 'ReactorListModal', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './AttachmentModal';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const AttachmentModalAsync: FC<OwnProps> = (props) => {
|
||||
const AttachmentModalAsync = (props: OwnProps) => {
|
||||
const { attachments } = props;
|
||||
const AttachmentModal = useModuleLoader(Bundles.Extra, 'AttachmentModal', !attachments.length);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './BotCommandMenu';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const BotCommandMenuAsync: FC<OwnProps> = (props) => {
|
||||
const BotCommandMenuAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const BotCommandMenu = useModuleLoader(Bundles.Extra, 'BotCommandMenu', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './ChatCommandTooltip';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const ChatCommandTooltipAsync: FC<OwnProps> = (props) => {
|
||||
const ChatCommandTooltipAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const ChatCommandTooltip = useModuleLoader(Bundles.Extra, 'ChatCommandTooltip', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './CustomEmojiTooltip';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const CustomEmojiTooltipAsync: FC<OwnProps> = (props) => {
|
||||
const CustomEmojiTooltipAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const CustomEmojiTooltip = useModuleLoader(Bundles.Extra, 'CustomEmojiTooltip', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './CustomSendMenu';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const CustomSendMenuAsync: FC<OwnProps> = (props) => {
|
||||
const CustomSendMenuAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const CustomSend = useModuleLoader(Bundles.Extra, 'CustomSendMenu', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './DropArea';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const DropAreaAsync: FC<OwnProps> = (props) => {
|
||||
const DropAreaAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const DropArea = useModuleLoader(Bundles.Extra, 'DropArea', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './EmojiTooltip';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const EmojiTooltipAsync: FC<OwnProps> = (props) => {
|
||||
const EmojiTooltipAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const EmojiTooltip = useModuleLoader(Bundles.Extra, 'EmojiTooltip', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './InlineBotTooltip';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const InlineBotTooltipAsync: FC<OwnProps> = (props) => {
|
||||
const InlineBotTooltipAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const InlineBotTooltip = useModuleLoader(Bundles.Extra, 'InlineBotTooltip', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './MentionTooltip';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const MentionTooltipAsync: FC<OwnProps> = (props) => {
|
||||
const MentionTooltipAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const MentionTooltip = useModuleLoader(Bundles.Extra, 'MentionTooltip', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './PollModal';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const PollModalAsync: FC<OwnProps> = (props) => {
|
||||
const PollModalAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const PollModal = useModuleLoader(Bundles.Extra, 'PollModal', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './SendAsMenu';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const SendAsMenuAsync: FC<OwnProps> = (props) => {
|
||||
const SendAsMenuAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const SendAsMenu = useModuleLoader(Bundles.Extra, 'SendAsMenu', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './StickerTooltip';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const StickerTooltipAsync: FC<OwnProps> = (props) => {
|
||||
const StickerTooltipAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const StickerTooltip = useModuleLoader(Bundles.Extra, 'StickerTooltip', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './SymbolMenu';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const SymbolMenuAsync: FC<OwnProps> = (props) => {
|
||||
const SymbolMenuAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const SymbolMenu = useModuleLoader(Bundles.Extra, 'SymbolMenu', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './TextFormatter';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const TextFormatterAsync: FC<OwnProps> = (props) => {
|
||||
const TextFormatterAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const TextFormatter = useModuleLoader(Bundles.Extra, 'TextFormatter', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './ToDoListModal';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const ToDoListModalAsync: FC<OwnProps> = (props) => {
|
||||
const ToDoListModalAsync = (props: OwnProps) => {
|
||||
const { modal } = props;
|
||||
const ToDoListModal = useModuleLoader(Bundles.Extra, 'ToDoListModal', !modal);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './ContextMenuContainer';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const ContextMenuContainerAsync: FC<OwnProps> = (props) => {
|
||||
const ContextMenuContainerAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const ContextMenuContainer = useModuleLoader(Bundles.Extra, 'ContextMenuContainer', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './SponsoredContextMenuContainer';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const SponsoredContextMenuContainerAsync: FC<OwnProps> = (props) => {
|
||||
const SponsoredContextMenuContainerAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const SponsoredContextMenuContainer = useModuleLoader(
|
||||
Bundles.Extra, 'SponsoredContextMenuContainer', !isOpen,
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './ReactionPicker';
|
||||
|
||||
import { Bundles } from '../../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../../hooks/useModuleLoader';
|
||||
|
||||
const ReactionPickerAsync: FC<OwnProps> = (props) => {
|
||||
const ReactionPickerAsync = (props: OwnProps) => {
|
||||
const { isOpen } = props;
|
||||
const ReactionPicker = useModuleLoader(Bundles.Extra, 'ReactionPicker', !isOpen);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './MiddleSearch';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const MiddleSearchAsync: FC<OwnProps> = (props) => {
|
||||
const MiddleSearchAsync = (props: OwnProps) => {
|
||||
const { isActive } = props;
|
||||
const MiddleSearch = useModuleLoader(Bundles.Extra, 'MiddleSearch', !isActive, true);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './AboutAdsModal';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const AboutAdsModalAsync: FC<OwnProps> = (props) => {
|
||||
const AboutAdsModalAsync = (props: OwnProps) => {
|
||||
const { modal } = props;
|
||||
const AboutAdsModal = useModuleLoader(Bundles.Extra, 'AboutAdsModal', !modal);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './AttachBotInstallModal';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const AttachBotInstallModalAsync: FC<OwnProps> = (props) => {
|
||||
const AttachBotInstallModalAsync = (props: OwnProps) => {
|
||||
const { modal } = props;
|
||||
const AttachBotInstallModal = useModuleLoader(Bundles.Extra, 'AttachBotInstallModal', !modal);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './BoostModal';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const BoostModalAsync: FC<OwnProps> = (props) => {
|
||||
const BoostModalAsync = (props: OwnProps) => {
|
||||
const { modal } = props;
|
||||
const BoostModal = useModuleLoader(Bundles.Extra, 'BoostModal', !modal);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './ChatInviteModal';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const ChatInviteModalAsync: FC<OwnProps> = (props) => {
|
||||
const ChatInviteModalAsync = (props: OwnProps) => {
|
||||
const { modal } = props;
|
||||
const ChatInviteModal = useModuleLoader(Bundles.Extra, 'ChatInviteModal', !modal);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './ChatlistModal';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const ChatlistModalAsync: FC<OwnProps> = (props) => {
|
||||
const ChatlistModalAsync = (props: OwnProps) => {
|
||||
const { modal } = props;
|
||||
const ChatlistModal = useModuleLoader(Bundles.Extra, 'ChatlistModal', !modal);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './CollectibleInfoModal';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const CollectibleInfoModalAsync: FC<OwnProps> = (props) => {
|
||||
const CollectibleInfoModalAsync = (props: OwnProps) => {
|
||||
const { modal } = props;
|
||||
const CollectibleInfoModal = useModuleLoader(Bundles.Extra, 'CollectibleInfoModal', !modal);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './DeleteAccountModal';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const DeleteAccountModalAsync: FC<OwnProps> = (props) => {
|
||||
const DeleteAccountModalAsync = (props: OwnProps) => {
|
||||
const { modal } = props;
|
||||
const DeleteAccountModal = useModuleLoader(Bundles.Extra, 'DeleteAccountModal', !modal);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './EmojiStatusAccessModal';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const EmojiStatusAccessModalAsync: FC<OwnProps> = (props) => {
|
||||
const EmojiStatusAccessModalAsync = (props: OwnProps) => {
|
||||
const { modal } = props;
|
||||
const EmojiStatusAccessModal = useModuleLoader(Bundles.Extra, 'EmojiStatusAccessModal', !modal);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './FrozenAccountModal';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const FrozenAccountModalAsync: FC<OwnProps> = (props) => {
|
||||
const FrozenAccountModalAsync = (props: OwnProps) => {
|
||||
const { modal } = props;
|
||||
const FrozenAccountModal = useModuleLoader(Bundles.Extra, 'FrozenAccountModal', !modal);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './GiftModal';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const GiftModalAsync: FC<OwnProps> = (props) => {
|
||||
const GiftModalAsync = (props: OwnProps) => {
|
||||
const { modal } = props;
|
||||
const GiftModal = useModuleLoader(Bundles.Stars, 'GiftModal', !modal);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './StarGiftPriceDecreaseInfoModal';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const StarGiftPriceDecreaseInfoModalAsync: FC<OwnProps> = (props) => {
|
||||
const StarGiftPriceDecreaseInfoModalAsync = (props: OwnProps) => {
|
||||
const { modal } = props;
|
||||
const StarGiftPriceDecreaseInfoModal = useModuleLoader(Bundles.Stars, 'StarGiftPriceDecreaseInfoModal', !modal);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './GiftInfoModal';
|
||||
|
||||
import { Bundles } from '../../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../../hooks/useModuleLoader';
|
||||
|
||||
const GiftInfoModalAsync: FC<OwnProps> = (props) => {
|
||||
const GiftInfoModalAsync = (props: OwnProps) => {
|
||||
const { modal } = props;
|
||||
const GiftInfoModal = useModuleLoader(Bundles.Stars, 'GiftInfoModal', !modal);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './GiftLockedModal';
|
||||
|
||||
import { Bundles } from '../../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../../hooks/useModuleLoader';
|
||||
|
||||
const GiftLockedModalAsync: FC<OwnProps> = (props) => {
|
||||
const GiftLockedModalAsync = (props: OwnProps) => {
|
||||
const { modal } = props;
|
||||
const GiftLockedModal = useModuleLoader(Bundles.Stars, 'GiftLockedModal', !modal);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './GiftDescriptionRemoveModal';
|
||||
|
||||
import { Bundles } from '../../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../../hooks/useModuleLoader';
|
||||
|
||||
const GiftDescriptionRemoveModalAsync: FC<OwnProps> = (props) => {
|
||||
const GiftDescriptionRemoveModalAsync = (props: OwnProps) => {
|
||||
const { modal } = props;
|
||||
const GiftDescriptionRemoveModal = useModuleLoader(Bundles.Stars, 'GiftDescriptionRemoveModal', !modal);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './GiftRecipientPicker';
|
||||
|
||||
import { Bundles } from '../../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../../hooks/useModuleLoader';
|
||||
|
||||
const GiftRecipientPickerAsync: FC<OwnProps> = (props) => {
|
||||
const GiftRecipientPickerAsync = (props: OwnProps) => {
|
||||
const { modal } = props;
|
||||
const GiftRecipientPicker = useModuleLoader(Bundles.Stars, 'GiftRecipientPicker', !modal);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './GiftResalePriceComposerModal';
|
||||
|
||||
import { Bundles } from '../../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../../hooks/useModuleLoader';
|
||||
|
||||
const GiftResalePriceComposerModalAsync: FC<OwnProps> = (props) => {
|
||||
const GiftResalePriceComposerModalAsync = (props: OwnProps) => {
|
||||
const { modal } = props;
|
||||
const GiftResalePriceComposerModal = useModuleLoader(Bundles.Stars, 'GiftResalePriceComposerModal', !modal);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './GiftStatusInfoModal';
|
||||
|
||||
import { Bundles } from '../../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../../hooks/useModuleLoader';
|
||||
|
||||
const GiftStatusInfoModalAsync: FC<OwnProps> = (props) => {
|
||||
const GiftStatusInfoModalAsync = (props: OwnProps) => {
|
||||
const { modal } = props;
|
||||
const GiftStatusInfoModal = useModuleLoader(Bundles.Stars, 'GiftStatusInfoModal', !modal);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './GiftTransferConfirmModal';
|
||||
|
||||
import { Bundles } from '../../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../../hooks/useModuleLoader';
|
||||
|
||||
const GiftTransferConfirmModalAsync: FC<OwnProps> = (props) => {
|
||||
const GiftTransferConfirmModalAsync = (props: OwnProps) => {
|
||||
const { modal } = props;
|
||||
const GiftTransferConfirmModal = useModuleLoader(
|
||||
Bundles.Stars,
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './GiftTransferModal';
|
||||
|
||||
import { Bundles } from '../../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../../hooks/useModuleLoader';
|
||||
|
||||
const GiftTransferModalAsync: FC<OwnProps> = (props) => {
|
||||
const GiftTransferModalAsync = (props: OwnProps) => {
|
||||
const { modal } = props;
|
||||
const GiftTransferModal = useModuleLoader(Bundles.Stars, 'GiftTransferModal', !modal);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './GiftUpgradeModal';
|
||||
|
||||
import { Bundles } from '../../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../../hooks/useModuleLoader';
|
||||
|
||||
const GiftUpgradeModalAsync: FC<OwnProps> = (props) => {
|
||||
const GiftUpgradeModalAsync = (props: OwnProps) => {
|
||||
const { modal } = props;
|
||||
const GiftUpgradeModal = useModuleLoader(Bundles.Stars, 'GiftUpgradeModal', !modal);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './GiftInfoValueModal';
|
||||
|
||||
import { Bundles } from '../../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../../hooks/useModuleLoader';
|
||||
|
||||
const GiftInfoValueModalAsync: FC<OwnProps> = (props) => {
|
||||
const GiftInfoValueModalAsync = (props: OwnProps) => {
|
||||
const { modal } = props;
|
||||
const GiftInfoValueModal = useModuleLoader(Bundles.Stars, 'GiftInfoValueModal', !modal);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './GiftWithdrawModal';
|
||||
|
||||
import { Bundles } from '../../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../../hooks/useModuleLoader';
|
||||
|
||||
const GiftWithdrawModalAsync: FC<OwnProps> = (props) => {
|
||||
const GiftWithdrawModalAsync = (props: OwnProps) => {
|
||||
const { modal } = props;
|
||||
const GiftWithdrawModal = useModuleLoader(Bundles.Stars, 'GiftWithdrawModal', !modal);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './GiftCodeModal';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const GiftCodeModalAsync: FC<OwnProps> = (props) => {
|
||||
const GiftCodeModalAsync = (props: OwnProps) => {
|
||||
const { modal } = props;
|
||||
const GiftCodeModal = useModuleLoader(Bundles.Extra, 'GiftCodeModal', !modal);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './InviteViaLinkModal';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const InviteViaLinkModalAsync: FC<OwnProps> = (props) => {
|
||||
const InviteViaLinkModalAsync = (props: OwnProps) => {
|
||||
const { modal } = props;
|
||||
const InviteViaLinkModal = useModuleLoader(Bundles.Extra, 'InviteViaLinkModal', !modal);
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps } from './LocationAccessModal';
|
||||
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
||||
const LocationAccessModalAsync: FC<OwnProps> = (props) => {
|
||||
const LocationAccessModalAsync = (props: OwnProps) => {
|
||||
const { modal } = props;
|
||||
const LocationAccessModal = useModuleLoader(Bundles.Extra, 'LocationAccessModal', !modal);
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user