= ({ chatId, type, threadId }) => {
- useHistoryBack({
- isActive: true,
- hash: createLocationHash(chatId, type, threadId),
- onBack: closeChat,
- });
- };
-
return (
{messageLists?.map((messageList, i) => (
))}
);
};
+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 => {
return {
diff --git a/src/components/middle/MessageSelectToolbar.async.tsx b/src/components/middle/MessageSelectToolbar.async.tsx
index 754348936..58d6585d7 100644
--- a/src/components/middle/MessageSelectToolbar.async.tsx
+++ b/src/components/middle/MessageSelectToolbar.async.tsx
@@ -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 = (props) => {
+const MessageSelectToolbarAsync = (props: OwnProps) => {
const { isActive } = props;
const MessageSelectToolbar = useModuleLoader(Bundles.Extra, 'MessageSelectToolbar', !isActive);
diff --git a/src/components/middle/ReactorListModal.async.tsx b/src/components/middle/ReactorListModal.async.tsx
index f2faedd71..a697d02c1 100644
--- a/src/components/middle/ReactorListModal.async.tsx
+++ b/src/components/middle/ReactorListModal.async.tsx
@@ -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 = (props) => {
+const ReactorListModalAsync = (props: OwnProps) => {
const { isOpen } = props;
const ReactorListModal = useModuleLoader(Bundles.Extra, 'ReactorListModal', !isOpen);
diff --git a/src/components/middle/composer/AttachmentModal.async.tsx b/src/components/middle/composer/AttachmentModal.async.tsx
index cfc32cd67..bb5db895a 100644
--- a/src/components/middle/composer/AttachmentModal.async.tsx
+++ b/src/components/middle/composer/AttachmentModal.async.tsx
@@ -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 = (props) => {
+const AttachmentModalAsync = (props: OwnProps) => {
const { attachments } = props;
const AttachmentModal = useModuleLoader(Bundles.Extra, 'AttachmentModal', !attachments.length);
diff --git a/src/components/middle/composer/BotCommandMenu.async.tsx b/src/components/middle/composer/BotCommandMenu.async.tsx
index 145d411c3..88f809c4f 100644
--- a/src/components/middle/composer/BotCommandMenu.async.tsx
+++ b/src/components/middle/composer/BotCommandMenu.async.tsx
@@ -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 = (props) => {
+const BotCommandMenuAsync = (props: OwnProps) => {
const { isOpen } = props;
const BotCommandMenu = useModuleLoader(Bundles.Extra, 'BotCommandMenu', !isOpen);
diff --git a/src/components/middle/composer/ChatCommandTooltip.async.tsx b/src/components/middle/composer/ChatCommandTooltip.async.tsx
index 732fe1f89..494928483 100644
--- a/src/components/middle/composer/ChatCommandTooltip.async.tsx
+++ b/src/components/middle/composer/ChatCommandTooltip.async.tsx
@@ -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 = (props) => {
+const ChatCommandTooltipAsync = (props: OwnProps) => {
const { isOpen } = props;
const ChatCommandTooltip = useModuleLoader(Bundles.Extra, 'ChatCommandTooltip', !isOpen);
diff --git a/src/components/middle/composer/CustomEmojiTooltip.async.tsx b/src/components/middle/composer/CustomEmojiTooltip.async.tsx
index 36dbcca06..30d5d54ab 100644
--- a/src/components/middle/composer/CustomEmojiTooltip.async.tsx
+++ b/src/components/middle/composer/CustomEmojiTooltip.async.tsx
@@ -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 = (props) => {
+const CustomEmojiTooltipAsync = (props: OwnProps) => {
const { isOpen } = props;
const CustomEmojiTooltip = useModuleLoader(Bundles.Extra, 'CustomEmojiTooltip', !isOpen);
diff --git a/src/components/middle/composer/CustomSendMenu.async.tsx b/src/components/middle/composer/CustomSendMenu.async.tsx
index a6a3f8dfb..021bc8658 100644
--- a/src/components/middle/composer/CustomSendMenu.async.tsx
+++ b/src/components/middle/composer/CustomSendMenu.async.tsx
@@ -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 = (props) => {
+const CustomSendMenuAsync = (props: OwnProps) => {
const { isOpen } = props;
const CustomSend = useModuleLoader(Bundles.Extra, 'CustomSendMenu', !isOpen);
diff --git a/src/components/middle/composer/DropArea.async.tsx b/src/components/middle/composer/DropArea.async.tsx
index 30e67af29..836aa1ca5 100644
--- a/src/components/middle/composer/DropArea.async.tsx
+++ b/src/components/middle/composer/DropArea.async.tsx
@@ -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 = (props) => {
+const DropAreaAsync = (props: OwnProps) => {
const { isOpen } = props;
const DropArea = useModuleLoader(Bundles.Extra, 'DropArea', !isOpen);
diff --git a/src/components/middle/composer/EmojiTooltip.async.tsx b/src/components/middle/composer/EmojiTooltip.async.tsx
index d726eec42..e6478962d 100644
--- a/src/components/middle/composer/EmojiTooltip.async.tsx
+++ b/src/components/middle/composer/EmojiTooltip.async.tsx
@@ -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 = (props) => {
+const EmojiTooltipAsync = (props: OwnProps) => {
const { isOpen } = props;
const EmojiTooltip = useModuleLoader(Bundles.Extra, 'EmojiTooltip', !isOpen);
diff --git a/src/components/middle/composer/InlineBotTooltip.async.tsx b/src/components/middle/composer/InlineBotTooltip.async.tsx
index f9128b0d0..5bdd0e030 100644
--- a/src/components/middle/composer/InlineBotTooltip.async.tsx
+++ b/src/components/middle/composer/InlineBotTooltip.async.tsx
@@ -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 = (props) => {
+const InlineBotTooltipAsync = (props: OwnProps) => {
const { isOpen } = props;
const InlineBotTooltip = useModuleLoader(Bundles.Extra, 'InlineBotTooltip', !isOpen);
diff --git a/src/components/middle/composer/MentionTooltip.async.tsx b/src/components/middle/composer/MentionTooltip.async.tsx
index 0c1f27922..e9be5d8c4 100644
--- a/src/components/middle/composer/MentionTooltip.async.tsx
+++ b/src/components/middle/composer/MentionTooltip.async.tsx
@@ -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 = (props) => {
+const MentionTooltipAsync = (props: OwnProps) => {
const { isOpen } = props;
const MentionTooltip = useModuleLoader(Bundles.Extra, 'MentionTooltip', !isOpen);
diff --git a/src/components/middle/composer/PollModal.async.tsx b/src/components/middle/composer/PollModal.async.tsx
index 9a56bb779..e5ed879a6 100644
--- a/src/components/middle/composer/PollModal.async.tsx
+++ b/src/components/middle/composer/PollModal.async.tsx
@@ -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 = (props) => {
+const PollModalAsync = (props: OwnProps) => {
const { isOpen } = props;
const PollModal = useModuleLoader(Bundles.Extra, 'PollModal', !isOpen);
diff --git a/src/components/middle/composer/SendAsMenu.async.tsx b/src/components/middle/composer/SendAsMenu.async.tsx
index 1e0c7db18..d5634e31f 100644
--- a/src/components/middle/composer/SendAsMenu.async.tsx
+++ b/src/components/middle/composer/SendAsMenu.async.tsx
@@ -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 = (props) => {
+const SendAsMenuAsync = (props: OwnProps) => {
const { isOpen } = props;
const SendAsMenu = useModuleLoader(Bundles.Extra, 'SendAsMenu', !isOpen);
diff --git a/src/components/middle/composer/StickerTooltip.async.tsx b/src/components/middle/composer/StickerTooltip.async.tsx
index f132b8bf6..5002bdfdf 100644
--- a/src/components/middle/composer/StickerTooltip.async.tsx
+++ b/src/components/middle/composer/StickerTooltip.async.tsx
@@ -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 = (props) => {
+const StickerTooltipAsync = (props: OwnProps) => {
const { isOpen } = props;
const StickerTooltip = useModuleLoader(Bundles.Extra, 'StickerTooltip', !isOpen);
diff --git a/src/components/middle/composer/SymbolMenu.async.tsx b/src/components/middle/composer/SymbolMenu.async.tsx
index 3058b642c..52b241939 100644
--- a/src/components/middle/composer/SymbolMenu.async.tsx
+++ b/src/components/middle/composer/SymbolMenu.async.tsx
@@ -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 = (props) => {
+const SymbolMenuAsync = (props: OwnProps) => {
const { isOpen } = props;
const SymbolMenu = useModuleLoader(Bundles.Extra, 'SymbolMenu', !isOpen);
diff --git a/src/components/middle/composer/TextFormatter.async.tsx b/src/components/middle/composer/TextFormatter.async.tsx
index ca48755f3..dcf78fbcc 100644
--- a/src/components/middle/composer/TextFormatter.async.tsx
+++ b/src/components/middle/composer/TextFormatter.async.tsx
@@ -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 = (props) => {
+const TextFormatterAsync = (props: OwnProps) => {
const { isOpen } = props;
const TextFormatter = useModuleLoader(Bundles.Extra, 'TextFormatter', !isOpen);
diff --git a/src/components/middle/composer/ToDoListModal.async.tsx b/src/components/middle/composer/ToDoListModal.async.tsx
index b06d2e814..52a39b1b1 100644
--- a/src/components/middle/composer/ToDoListModal.async.tsx
+++ b/src/components/middle/composer/ToDoListModal.async.tsx
@@ -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 = (props) => {
+const ToDoListModalAsync = (props: OwnProps) => {
const { modal } = props;
const ToDoListModal = useModuleLoader(Bundles.Extra, 'ToDoListModal', !modal);
diff --git a/src/components/middle/message/ContextMenuContainer.async.tsx b/src/components/middle/message/ContextMenuContainer.async.tsx
index 07ad455fb..45c173791 100644
--- a/src/components/middle/message/ContextMenuContainer.async.tsx
+++ b/src/components/middle/message/ContextMenuContainer.async.tsx
@@ -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 = (props) => {
+const ContextMenuContainerAsync = (props: OwnProps) => {
const { isOpen } = props;
const ContextMenuContainer = useModuleLoader(Bundles.Extra, 'ContextMenuContainer', !isOpen);
diff --git a/src/components/middle/message/SponsoredContextMenuContainer.async.tsx b/src/components/middle/message/SponsoredContextMenuContainer.async.tsx
index 942a6a207..5b82e5c81 100644
--- a/src/components/middle/message/SponsoredContextMenuContainer.async.tsx
+++ b/src/components/middle/message/SponsoredContextMenuContainer.async.tsx
@@ -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 = (props) => {
+const SponsoredContextMenuContainerAsync = (props: OwnProps) => {
const { isOpen } = props;
const SponsoredContextMenuContainer = useModuleLoader(
Bundles.Extra, 'SponsoredContextMenuContainer', !isOpen,
diff --git a/src/components/middle/message/reactions/ReactionPicker.async.tsx b/src/components/middle/message/reactions/ReactionPicker.async.tsx
index 5f3caa807..df3108afa 100644
--- a/src/components/middle/message/reactions/ReactionPicker.async.tsx
+++ b/src/components/middle/message/reactions/ReactionPicker.async.tsx
@@ -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 = (props) => {
+const ReactionPickerAsync = (props: OwnProps) => {
const { isOpen } = props;
const ReactionPicker = useModuleLoader(Bundles.Extra, 'ReactionPicker', !isOpen);
diff --git a/src/components/middle/search/MiddleSearch.async.tsx b/src/components/middle/search/MiddleSearch.async.tsx
index f07282380..d395cd4bc 100644
--- a/src/components/middle/search/MiddleSearch.async.tsx
+++ b/src/components/middle/search/MiddleSearch.async.tsx
@@ -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 = (props) => {
+const MiddleSearchAsync = (props: OwnProps) => {
const { isActive } = props;
const MiddleSearch = useModuleLoader(Bundles.Extra, 'MiddleSearch', !isActive, true);
diff --git a/src/components/modals/aboutAds/AboutAdsModal.async.tsx b/src/components/modals/aboutAds/AboutAdsModal.async.tsx
index 6f65102a3..0e5e0aa71 100644
--- a/src/components/modals/aboutAds/AboutAdsModal.async.tsx
+++ b/src/components/modals/aboutAds/AboutAdsModal.async.tsx
@@ -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 = (props) => {
+const AboutAdsModalAsync = (props: OwnProps) => {
const { modal } = props;
const AboutAdsModal = useModuleLoader(Bundles.Extra, 'AboutAdsModal', !modal);
diff --git a/src/components/modals/attachBotInstall/AttachBotInstallModal.async.tsx b/src/components/modals/attachBotInstall/AttachBotInstallModal.async.tsx
index f2d43b8ff..18235314a 100644
--- a/src/components/modals/attachBotInstall/AttachBotInstallModal.async.tsx
+++ b/src/components/modals/attachBotInstall/AttachBotInstallModal.async.tsx
@@ -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 = (props) => {
+const AttachBotInstallModalAsync = (props: OwnProps) => {
const { modal } = props;
const AttachBotInstallModal = useModuleLoader(Bundles.Extra, 'AttachBotInstallModal', !modal);
diff --git a/src/components/modals/boost/BoostModal.async.tsx b/src/components/modals/boost/BoostModal.async.tsx
index 191f31a06..d0e854768 100644
--- a/src/components/modals/boost/BoostModal.async.tsx
+++ b/src/components/modals/boost/BoostModal.async.tsx
@@ -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 = (props) => {
+const BoostModalAsync = (props: OwnProps) => {
const { modal } = props;
const BoostModal = useModuleLoader(Bundles.Extra, 'BoostModal', !modal);
diff --git a/src/components/modals/chatInvite/ChatInviteModal.async.tsx b/src/components/modals/chatInvite/ChatInviteModal.async.tsx
index be799bb08..5cdbdfce1 100644
--- a/src/components/modals/chatInvite/ChatInviteModal.async.tsx
+++ b/src/components/modals/chatInvite/ChatInviteModal.async.tsx
@@ -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 = (props) => {
+const ChatInviteModalAsync = (props: OwnProps) => {
const { modal } = props;
const ChatInviteModal = useModuleLoader(Bundles.Extra, 'ChatInviteModal', !modal);
diff --git a/src/components/modals/chatlist/ChatlistModal.async.tsx b/src/components/modals/chatlist/ChatlistModal.async.tsx
index a1314db13..ae1e8418a 100644
--- a/src/components/modals/chatlist/ChatlistModal.async.tsx
+++ b/src/components/modals/chatlist/ChatlistModal.async.tsx
@@ -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 = (props) => {
+const ChatlistModalAsync = (props: OwnProps) => {
const { modal } = props;
const ChatlistModal = useModuleLoader(Bundles.Extra, 'ChatlistModal', !modal);
diff --git a/src/components/modals/collectible/CollectibleInfoModal.async.tsx b/src/components/modals/collectible/CollectibleInfoModal.async.tsx
index b6b43fa81..28a2e800e 100644
--- a/src/components/modals/collectible/CollectibleInfoModal.async.tsx
+++ b/src/components/modals/collectible/CollectibleInfoModal.async.tsx
@@ -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 = (props) => {
+const CollectibleInfoModalAsync = (props: OwnProps) => {
const { modal } = props;
const CollectibleInfoModal = useModuleLoader(Bundles.Extra, 'CollectibleInfoModal', !modal);
diff --git a/src/components/modals/deleteAccount/DeleteAccountModal.async.tsx b/src/components/modals/deleteAccount/DeleteAccountModal.async.tsx
index 5fd97dca8..2c4949368 100644
--- a/src/components/modals/deleteAccount/DeleteAccountModal.async.tsx
+++ b/src/components/modals/deleteAccount/DeleteAccountModal.async.tsx
@@ -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 = (props) => {
+const DeleteAccountModalAsync = (props: OwnProps) => {
const { modal } = props;
const DeleteAccountModal = useModuleLoader(Bundles.Extra, 'DeleteAccountModal', !modal);
diff --git a/src/components/modals/emojiStatusAccess/EmojiStatusAccessModal.async.tsx b/src/components/modals/emojiStatusAccess/EmojiStatusAccessModal.async.tsx
index c39bd33c7..1f8479a9b 100644
--- a/src/components/modals/emojiStatusAccess/EmojiStatusAccessModal.async.tsx
+++ b/src/components/modals/emojiStatusAccess/EmojiStatusAccessModal.async.tsx
@@ -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 = (props) => {
+const EmojiStatusAccessModalAsync = (props: OwnProps) => {
const { modal } = props;
const EmojiStatusAccessModal = useModuleLoader(Bundles.Extra, 'EmojiStatusAccessModal', !modal);
diff --git a/src/components/modals/frozenAccount/FrozenAccountModal.async.tsx b/src/components/modals/frozenAccount/FrozenAccountModal.async.tsx
index 475a564de..1b19c40c9 100644
--- a/src/components/modals/frozenAccount/FrozenAccountModal.async.tsx
+++ b/src/components/modals/frozenAccount/FrozenAccountModal.async.tsx
@@ -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 = (props) => {
+const FrozenAccountModalAsync = (props: OwnProps) => {
const { modal } = props;
const FrozenAccountModal = useModuleLoader(Bundles.Extra, 'FrozenAccountModal', !modal);
diff --git a/src/components/modals/gift/GiftModal.async.tsx b/src/components/modals/gift/GiftModal.async.tsx
index fa97c1165..cc137123b 100644
--- a/src/components/modals/gift/GiftModal.async.tsx
+++ b/src/components/modals/gift/GiftModal.async.tsx
@@ -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 = (props) => {
+const GiftModalAsync = (props: OwnProps) => {
const { modal } = props;
const GiftModal = useModuleLoader(Bundles.Stars, 'GiftModal', !modal);
diff --git a/src/components/modals/gift/StarGiftPriceDecreaseInfoModal.async.tsx b/src/components/modals/gift/StarGiftPriceDecreaseInfoModal.async.tsx
index d5fadbf83..896420316 100644
--- a/src/components/modals/gift/StarGiftPriceDecreaseInfoModal.async.tsx
+++ b/src/components/modals/gift/StarGiftPriceDecreaseInfoModal.async.tsx
@@ -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 = (props) => {
+const StarGiftPriceDecreaseInfoModalAsync = (props: OwnProps) => {
const { modal } = props;
const StarGiftPriceDecreaseInfoModal = useModuleLoader(Bundles.Stars, 'StarGiftPriceDecreaseInfoModal', !modal);
diff --git a/src/components/modals/gift/info/GiftInfoModal.async.tsx b/src/components/modals/gift/info/GiftInfoModal.async.tsx
index 68ddb5a65..e26b6b42e 100644
--- a/src/components/modals/gift/info/GiftInfoModal.async.tsx
+++ b/src/components/modals/gift/info/GiftInfoModal.async.tsx
@@ -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 = (props) => {
+const GiftInfoModalAsync = (props: OwnProps) => {
const { modal } = props;
const GiftInfoModal = useModuleLoader(Bundles.Stars, 'GiftInfoModal', !modal);
diff --git a/src/components/modals/gift/locked/GiftLockedModal.async.tsx b/src/components/modals/gift/locked/GiftLockedModal.async.tsx
index 657769936..3b7e0848b 100644
--- a/src/components/modals/gift/locked/GiftLockedModal.async.tsx
+++ b/src/components/modals/gift/locked/GiftLockedModal.async.tsx
@@ -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 = (props) => {
+const GiftLockedModalAsync = (props: OwnProps) => {
const { modal } = props;
const GiftLockedModal = useModuleLoader(Bundles.Stars, 'GiftLockedModal', !modal);
diff --git a/src/components/modals/gift/message/GiftDescriptionRemoveModal.async.tsx b/src/components/modals/gift/message/GiftDescriptionRemoveModal.async.tsx
index 7152ba9fc..1e7067586 100644
--- a/src/components/modals/gift/message/GiftDescriptionRemoveModal.async.tsx
+++ b/src/components/modals/gift/message/GiftDescriptionRemoveModal.async.tsx
@@ -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 = (props) => {
+const GiftDescriptionRemoveModalAsync = (props: OwnProps) => {
const { modal } = props;
const GiftDescriptionRemoveModal = useModuleLoader(Bundles.Stars, 'GiftDescriptionRemoveModal', !modal);
diff --git a/src/components/modals/gift/recipient/GiftRecipientPicker.async.tsx b/src/components/modals/gift/recipient/GiftRecipientPicker.async.tsx
index 54a86dfa9..c40349fdb 100644
--- a/src/components/modals/gift/recipient/GiftRecipientPicker.async.tsx
+++ b/src/components/modals/gift/recipient/GiftRecipientPicker.async.tsx
@@ -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 = (props) => {
+const GiftRecipientPickerAsync = (props: OwnProps) => {
const { modal } = props;
const GiftRecipientPicker = useModuleLoader(Bundles.Stars, 'GiftRecipientPicker', !modal);
diff --git a/src/components/modals/gift/resale/GiftResalePriceComposerModal.async.tsx b/src/components/modals/gift/resale/GiftResalePriceComposerModal.async.tsx
index e60b23a1a..671c3e2ed 100644
--- a/src/components/modals/gift/resale/GiftResalePriceComposerModal.async.tsx
+++ b/src/components/modals/gift/resale/GiftResalePriceComposerModal.async.tsx
@@ -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 = (props) => {
+const GiftResalePriceComposerModalAsync = (props: OwnProps) => {
const { modal } = props;
const GiftResalePriceComposerModal = useModuleLoader(Bundles.Stars, 'GiftResalePriceComposerModal', !modal);
diff --git a/src/components/modals/gift/status/GiftStatusInfoModal.async.tsx b/src/components/modals/gift/status/GiftStatusInfoModal.async.tsx
index a0c730ff0..2d6ad086e 100644
--- a/src/components/modals/gift/status/GiftStatusInfoModal.async.tsx
+++ b/src/components/modals/gift/status/GiftStatusInfoModal.async.tsx
@@ -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 = (props) => {
+const GiftStatusInfoModalAsync = (props: OwnProps) => {
const { modal } = props;
const GiftStatusInfoModal = useModuleLoader(Bundles.Stars, 'GiftStatusInfoModal', !modal);
diff --git a/src/components/modals/gift/transfer/GiftTransferConfirmModal.async.tsx b/src/components/modals/gift/transfer/GiftTransferConfirmModal.async.tsx
index 1a8be517e..fc6399994 100644
--- a/src/components/modals/gift/transfer/GiftTransferConfirmModal.async.tsx
+++ b/src/components/modals/gift/transfer/GiftTransferConfirmModal.async.tsx
@@ -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 = (props) => {
+const GiftTransferConfirmModalAsync = (props: OwnProps) => {
const { modal } = props;
const GiftTransferConfirmModal = useModuleLoader(
Bundles.Stars,
diff --git a/src/components/modals/gift/transfer/GiftTransferModal.async.tsx b/src/components/modals/gift/transfer/GiftTransferModal.async.tsx
index 94c70cca9..d8215edb4 100644
--- a/src/components/modals/gift/transfer/GiftTransferModal.async.tsx
+++ b/src/components/modals/gift/transfer/GiftTransferModal.async.tsx
@@ -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 = (props) => {
+const GiftTransferModalAsync = (props: OwnProps) => {
const { modal } = props;
const GiftTransferModal = useModuleLoader(Bundles.Stars, 'GiftTransferModal', !modal);
diff --git a/src/components/modals/gift/upgrade/GiftUpgradeModal.async.tsx b/src/components/modals/gift/upgrade/GiftUpgradeModal.async.tsx
index 9ae43c7c8..0e9e31b91 100644
--- a/src/components/modals/gift/upgrade/GiftUpgradeModal.async.tsx
+++ b/src/components/modals/gift/upgrade/GiftUpgradeModal.async.tsx
@@ -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 = (props) => {
+const GiftUpgradeModalAsync = (props: OwnProps) => {
const { modal } = props;
const GiftUpgradeModal = useModuleLoader(Bundles.Stars, 'GiftUpgradeModal', !modal);
diff --git a/src/components/modals/gift/value/GiftInfoValueModal.async.tsx b/src/components/modals/gift/value/GiftInfoValueModal.async.tsx
index 4e6fdf498..dbff7b5ce 100644
--- a/src/components/modals/gift/value/GiftInfoValueModal.async.tsx
+++ b/src/components/modals/gift/value/GiftInfoValueModal.async.tsx
@@ -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 = (props) => {
+const GiftInfoValueModalAsync = (props: OwnProps) => {
const { modal } = props;
const GiftInfoValueModal = useModuleLoader(Bundles.Stars, 'GiftInfoValueModal', !modal);
diff --git a/src/components/modals/gift/withdraw/GiftWithdrawModal.async.tsx b/src/components/modals/gift/withdraw/GiftWithdrawModal.async.tsx
index 3f0da9d1a..03421fabb 100644
--- a/src/components/modals/gift/withdraw/GiftWithdrawModal.async.tsx
+++ b/src/components/modals/gift/withdraw/GiftWithdrawModal.async.tsx
@@ -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 = (props) => {
+const GiftWithdrawModalAsync = (props: OwnProps) => {
const { modal } = props;
const GiftWithdrawModal = useModuleLoader(Bundles.Stars, 'GiftWithdrawModal', !modal);
diff --git a/src/components/modals/giftcode/GiftCodeModal.async.tsx b/src/components/modals/giftcode/GiftCodeModal.async.tsx
index c5c5a33b4..67d0d03a4 100644
--- a/src/components/modals/giftcode/GiftCodeModal.async.tsx
+++ b/src/components/modals/giftcode/GiftCodeModal.async.tsx
@@ -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 = (props) => {
+const GiftCodeModalAsync = (props: OwnProps) => {
const { modal } = props;
const GiftCodeModal = useModuleLoader(Bundles.Extra, 'GiftCodeModal', !modal);
diff --git a/src/components/modals/inviteViaLink/InviteViaLinkModal.async.tsx b/src/components/modals/inviteViaLink/InviteViaLinkModal.async.tsx
index 60764435c..fde4a8fef 100644
--- a/src/components/modals/inviteViaLink/InviteViaLinkModal.async.tsx
+++ b/src/components/modals/inviteViaLink/InviteViaLinkModal.async.tsx
@@ -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 = (props) => {
+const InviteViaLinkModalAsync = (props: OwnProps) => {
const { modal } = props;
const InviteViaLinkModal = useModuleLoader(Bundles.Extra, 'InviteViaLinkModal', !modal);
diff --git a/src/components/modals/locationAccess/LocationAccessModal.async.tsx b/src/components/modals/locationAccess/LocationAccessModal.async.tsx
index 590071327..1a397ea86 100644
--- a/src/components/modals/locationAccess/LocationAccessModal.async.tsx
+++ b/src/components/modals/locationAccess/LocationAccessModal.async.tsx
@@ -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 = (props) => {
+const LocationAccessModalAsync = (props: OwnProps) => {
const { modal } = props;
const LocationAccessModal = useModuleLoader(Bundles.Extra, 'LocationAccessModal', !modal);
diff --git a/src/components/modals/map/MapModal.async.tsx b/src/components/modals/map/MapModal.async.tsx
index e60d11cbd..99d302c56 100644
--- a/src/components/modals/map/MapModal.async.tsx
+++ b/src/components/modals/map/MapModal.async.tsx
@@ -1,12 +1,10 @@
-import type { FC } from '../../../lib/teact/teact';
-
import type { OwnProps } from './MapModal';
import { Bundles } from '../../../util/moduleLoader';
import useModuleLoader from '../../../hooks/useModuleLoader';
-const MapModalAsync: FC = (props) => {
+const MapModalAsync = (props: OwnProps) => {
const { modal } = props;
const MapModal = useModuleLoader(Bundles.Extra, 'MapModal', !modal);
diff --git a/src/components/modals/oneTimeMedia/OneTimeMediaModal.async.tsx b/src/components/modals/oneTimeMedia/OneTimeMediaModal.async.tsx
index 8e6ca3319..d61d8e953 100644
--- a/src/components/modals/oneTimeMedia/OneTimeMediaModal.async.tsx
+++ b/src/components/modals/oneTimeMedia/OneTimeMediaModal.async.tsx
@@ -1,12 +1,10 @@
-import type { FC } from '../../../lib/teact/teact';
-
import type { OwnProps } from './OneTimeMediaModal';
import { Bundles } from '../../../util/moduleLoader';
import useModuleLoader from '../../../hooks/useModuleLoader';
-const OneTimeMediaModalAsync: FC = (props) => {
+const OneTimeMediaModalAsync = (props: OwnProps) => {
const { modal } = props;
const OneTimeMediaModal = useModuleLoader(Bundles.Extra, 'OneTimeMediaModal', !modal);
diff --git a/src/components/modals/paidReaction/PaidReactionModal.async.tsx b/src/components/modals/paidReaction/PaidReactionModal.async.tsx
index b580477ee..dcf6b822e 100644
--- a/src/components/modals/paidReaction/PaidReactionModal.async.tsx
+++ b/src/components/modals/paidReaction/PaidReactionModal.async.tsx
@@ -1,12 +1,10 @@
-import type { FC } from '../../../lib/teact/teact';
-
import type { OwnProps } from './PaidReactionModal';
import { Bundles } from '../../../util/moduleLoader';
import useModuleLoader from '../../../hooks/useModuleLoader';
-const PaidReactionModalAsync: FC = (props) => {
+const PaidReactionModalAsync = (props: OwnProps) => {
const { modal } = props;
const PaidReactionModal = useModuleLoader(Bundles.Stars, 'PaidReactionModal', !modal);
diff --git a/src/components/modals/preparedMessage/PreparedMessageModal.async.tsx b/src/components/modals/preparedMessage/PreparedMessageModal.async.tsx
index 8f0b53851..7e4122ca9 100644
--- a/src/components/modals/preparedMessage/PreparedMessageModal.async.tsx
+++ b/src/components/modals/preparedMessage/PreparedMessageModal.async.tsx
@@ -1,12 +1,10 @@
-import type { FC } from '../../../lib/teact/teact';
-
import type { OwnProps } from './PreparedMessageModal';
import { Bundles } from '../../../util/moduleLoader';
import useModuleLoader from '../../../hooks/useModuleLoader';
-const PreparedMessageModalAsync: FC = (props) => {
+const PreparedMessageModalAsync = (props: OwnProps) => {
const { modal } = props;
const PreparedMessageModal = useModuleLoader(Bundles.Extra, 'PreparedMessageModal', !modal);
diff --git a/src/components/modals/profileRating/ProfileRatingModal.async.tsx b/src/components/modals/profileRating/ProfileRatingModal.async.tsx
index c57cd57a6..6a53c225d 100644
--- a/src/components/modals/profileRating/ProfileRatingModal.async.tsx
+++ b/src/components/modals/profileRating/ProfileRatingModal.async.tsx
@@ -1,12 +1,10 @@
-import type { FC } from '../../../lib/teact/teact';
-
import type { OwnProps } from './ProfileRatingModal';
import { Bundles } from '../../../util/moduleLoader';
import useModuleLoader from '../../../hooks/useModuleLoader';
-const ProfileRatingModalAsync: FC = (props) => {
+const ProfileRatingModalAsync = (props: OwnProps) => {
const { modal } = props;
const ProfileRatingModal = useModuleLoader(Bundles.Extra, 'ProfileRatingModal', !modal);
diff --git a/src/components/modals/reportAd/ReportAdModal.async.tsx b/src/components/modals/reportAd/ReportAdModal.async.tsx
index 3ad4d7dc5..76e9fba61 100644
--- a/src/components/modals/reportAd/ReportAdModal.async.tsx
+++ b/src/components/modals/reportAd/ReportAdModal.async.tsx
@@ -1,12 +1,10 @@
-import type { FC } from '../../../lib/teact/teact';
-
import type { OwnProps } from './ReportAdModal';
import { Bundles } from '../../../util/moduleLoader';
import useModuleLoader from '../../../hooks/useModuleLoader';
-const ReportAdModalAsync: FC = (props) => {
+const ReportAdModalAsync = (props: OwnProps) => {
const { modal } = props;
const ReportAdModal = useModuleLoader(Bundles.Extra, 'ReportAdModal', !modal);
diff --git a/src/components/modals/reportModal/ReportModal.async.tsx b/src/components/modals/reportModal/ReportModal.async.tsx
index f45d988aa..95e7d3d87 100644
--- a/src/components/modals/reportModal/ReportModal.async.tsx
+++ b/src/components/modals/reportModal/ReportModal.async.tsx
@@ -1,12 +1,10 @@
-import type { FC } from '../../../lib/teact/teact';
-
import type { OwnProps } from './ReportModal';
import { Bundles } from '../../../util/moduleLoader';
import useModuleLoader from '../../../hooks/useModuleLoader';
-const ReportModalAsync: FC = (props) => {
+const ReportModalAsync = (props: OwnProps) => {
const { modal } = props;
const ReportModal = useModuleLoader(Bundles.Extra, 'ReportModal', !modal);
diff --git a/src/components/modals/sharePreparedMessage/SharePreparedMessageModal.async.tsx b/src/components/modals/sharePreparedMessage/SharePreparedMessageModal.async.tsx
index f6983de10..ca1ca0b74 100644
--- a/src/components/modals/sharePreparedMessage/SharePreparedMessageModal.async.tsx
+++ b/src/components/modals/sharePreparedMessage/SharePreparedMessageModal.async.tsx
@@ -1,12 +1,10 @@
-import type { FC } from '../../../lib/teact/teact';
-
import type { OwnProps } from './SharePreparedMessageModal';
import { Bundles } from '../../../util/moduleLoader';
import useModuleLoader from '../../../hooks/useModuleLoader';
-const SharePreparedMessageModalAsync: FC = (props) => {
+const SharePreparedMessageModalAsync = (props: OwnProps) => {
const { modal } = props;
const SharePreparedMessageModal = useModuleLoader(Bundles.Extra, 'SharePreparedMessageModal', !modal);
diff --git a/src/components/modals/stars/StarsBalanceModal.async.tsx b/src/components/modals/stars/StarsBalanceModal.async.tsx
index a73ac310b..54cd54aff 100644
--- a/src/components/modals/stars/StarsBalanceModal.async.tsx
+++ b/src/components/modals/stars/StarsBalanceModal.async.tsx
@@ -1,12 +1,10 @@
-import type { FC } from '../../../lib/teact/teact';
-
import type { OwnProps } from './StarsBalanceModal';
import { Bundles } from '../../../util/moduleLoader';
import useModuleLoader from '../../../hooks/useModuleLoader';
-const StarsBalanceModalAsync: FC = (props) => {
+const StarsBalanceModalAsync = (props: OwnProps) => {
const { modal } = props;
const StarsBalanceModal = useModuleLoader(Bundles.Stars, 'StarsBalanceModal', !modal);
diff --git a/src/components/modals/stars/StarsPaymentModal.async.tsx b/src/components/modals/stars/StarsPaymentModal.async.tsx
index 8cb82de39..c579b692a 100644
--- a/src/components/modals/stars/StarsPaymentModal.async.tsx
+++ b/src/components/modals/stars/StarsPaymentModal.async.tsx
@@ -1,12 +1,10 @@
-import type { FC } from '../../../lib/teact/teact';
-
import type { OwnProps } from './StarsPaymentModal';
import { Bundles } from '../../../util/moduleLoader';
import useModuleLoader from '../../../hooks/useModuleLoader';
-const StarPaymentModalAsync: FC = (props) => {
+const StarPaymentModalAsync = (props: OwnProps) => {
const { modal } = props;
const StarPaymentModal = useModuleLoader(Bundles.Stars, 'StarPaymentModal', !modal?.inputInvoice);
diff --git a/src/components/modals/stars/chatRefund/ChatRefundModal.async.tsx b/src/components/modals/stars/chatRefund/ChatRefundModal.async.tsx
index 4aed9eaf5..64ca2584d 100644
--- a/src/components/modals/stars/chatRefund/ChatRefundModal.async.tsx
+++ b/src/components/modals/stars/chatRefund/ChatRefundModal.async.tsx
@@ -1,12 +1,10 @@
-import type { FC } from '../../../../lib/teact/teact';
-
import type { OwnProps } from './ChatRefundModal';
import { Bundles } from '../../../../util/moduleLoader';
import useModuleLoader from '../../../../hooks/useModuleLoader';
-const ChatRefundModalAsync: FC = (props) => {
+const ChatRefundModalAsync = (props: OwnProps) => {
const { modal } = props;
const ChatRefundModal = useModuleLoader(Bundles.Stars, 'ChatRefundModal', !modal);
diff --git a/src/components/modals/stars/gift/StarsGiftModal.async.tsx b/src/components/modals/stars/gift/StarsGiftModal.async.tsx
index 51ca2804c..4485ab50d 100644
--- a/src/components/modals/stars/gift/StarsGiftModal.async.tsx
+++ b/src/components/modals/stars/gift/StarsGiftModal.async.tsx
@@ -1,12 +1,10 @@
-import type { FC } from '../../../../lib/teact/teact';
-
import type { OwnProps } from './StarsGiftModal';
import { Bundles } from '../../../../util/moduleLoader';
import useModuleLoader from '../../../../hooks/useModuleLoader';
-const StarsGiftModalAsync: FC = (props) => {
+const StarsGiftModalAsync = (props: OwnProps) => {
const { modal } = props;
const StarsGiftModal = useModuleLoader(Bundles.Stars, 'StarsGiftModal', !modal);
diff --git a/src/components/modals/stars/subscription/StarsSubscriptionModal.async.tsx b/src/components/modals/stars/subscription/StarsSubscriptionModal.async.tsx
index 2867db927..a18708899 100644
--- a/src/components/modals/stars/subscription/StarsSubscriptionModal.async.tsx
+++ b/src/components/modals/stars/subscription/StarsSubscriptionModal.async.tsx
@@ -1,12 +1,10 @@
-import type { FC } from '../../../../lib/teact/teact';
-
import type { OwnProps } from './StarsSubscriptionModal';
import { Bundles } from '../../../../util/moduleLoader';
import useModuleLoader from '../../../../hooks/useModuleLoader';
-const StarsSubscriptionModalAsync: FC = (props) => {
+const StarsSubscriptionModalAsync = (props: OwnProps) => {
const { modal } = props;
const StarsSubscriptionModal = useModuleLoader(Bundles.Stars, 'StarsSubscriptionModal', !modal);
diff --git a/src/components/modals/stars/transaction/StarsTransactionModal.async.tsx b/src/components/modals/stars/transaction/StarsTransactionModal.async.tsx
index 5e588b805..8e190da10 100644
--- a/src/components/modals/stars/transaction/StarsTransactionModal.async.tsx
+++ b/src/components/modals/stars/transaction/StarsTransactionModal.async.tsx
@@ -1,12 +1,10 @@
-import type { FC } from '../../../../lib/teact/teact';
-
import type { OwnProps } from './StarsTransactionModal';
import { Bundles } from '../../../../util/moduleLoader';
import useModuleLoader from '../../../../hooks/useModuleLoader';
-const StarsTransactionModalAsync: FC = (props) => {
+const StarsTransactionModalAsync = (props: OwnProps) => {
const { modal } = props;
const StarsTransactionModal = useModuleLoader(Bundles.Stars, 'StarsTransactionInfoModal', !modal);
diff --git a/src/components/modals/suggestMessage/SuggestMessageModal.async.tsx b/src/components/modals/suggestMessage/SuggestMessageModal.async.tsx
index 98b46252a..ded51d982 100644
--- a/src/components/modals/suggestMessage/SuggestMessageModal.async.tsx
+++ b/src/components/modals/suggestMessage/SuggestMessageModal.async.tsx
@@ -1,12 +1,10 @@
-import type { FC } from '../../../lib/teact/teact';
-
import type { OwnProps } from './SuggestMessageModal';
import { Bundles } from '../../../util/moduleLoader';
import useModuleLoader from '../../../hooks/useModuleLoader';
-const SuggestMessageModalAsync: FC = (props) => {
+const SuggestMessageModalAsync = (props: OwnProps) => {
const { modal } = props;
const SuggestMessageModal = useModuleLoader(Bundles.Extra, 'SuggestMessageModal', !modal);
diff --git a/src/components/modals/suggestedPostApproval/SuggestedPostApprovalModal.async.tsx b/src/components/modals/suggestedPostApproval/SuggestedPostApprovalModal.async.tsx
index 4c99a9495..6ea4dad88 100644
--- a/src/components/modals/suggestedPostApproval/SuggestedPostApprovalModal.async.tsx
+++ b/src/components/modals/suggestedPostApproval/SuggestedPostApprovalModal.async.tsx
@@ -1,12 +1,10 @@
-import type { FC } from '../../../lib/teact/teact';
-
import type { OwnProps } from './SuggestedPostApprovalModal';
import { Bundles } from '../../../util/moduleLoader';
import useModuleLoader from '../../../hooks/useModuleLoader';
-const SuggestedPostApprovalModalAsync: FC = (props) => {
+const SuggestedPostApprovalModalAsync = (props: OwnProps) => {
const { modal } = props;
const SuggestedPostApprovalModal = useModuleLoader(Bundles.Extra, 'SuggestedPostApprovalModal', !modal);
diff --git a/src/components/modals/suggestedStatus/SuggestedStatusModal.async.tsx b/src/components/modals/suggestedStatus/SuggestedStatusModal.async.tsx
index df3feee39..c922b53aa 100644
--- a/src/components/modals/suggestedStatus/SuggestedStatusModal.async.tsx
+++ b/src/components/modals/suggestedStatus/SuggestedStatusModal.async.tsx
@@ -1,12 +1,10 @@
-import type { FC } from '../../../lib/teact/teact';
-
import type { OwnProps } from './SuggestedStatusModal';
import { Bundles } from '../../../util/moduleLoader';
import useModuleLoader from '../../../hooks/useModuleLoader';
-const SuggestedStatusModalAsync: FC = (props) => {
+const SuggestedStatusModalAsync = (props: OwnProps) => {
const { modal } = props;
const SuggestedStatusModal = useModuleLoader(Bundles.Extra, 'SuggestedStatusModal', !modal);
diff --git a/src/components/modals/urlAuth/UrlAuthModal.async.tsx b/src/components/modals/urlAuth/UrlAuthModal.async.tsx
index 6b91e6372..35d78ec0f 100644
--- a/src/components/modals/urlAuth/UrlAuthModal.async.tsx
+++ b/src/components/modals/urlAuth/UrlAuthModal.async.tsx
@@ -1,12 +1,10 @@
-import type { FC } from '../../../lib/teact/teact';
-
import type { OwnProps } from './UrlAuthModal';
import { Bundles } from '../../../util/moduleLoader';
import useModuleLoader from '../../../hooks/useModuleLoader';
-const UrlAuthModalAsync: FC = (props) => {
+const UrlAuthModalAsync = (props: OwnProps) => {
const { modal } = props;
const UrlAuthModal = useModuleLoader(Bundles.Extra, 'UrlAuthModal', !modal);
diff --git a/src/components/modals/webApp/MoreAppsTabContent.tsx b/src/components/modals/webApp/MoreAppsTabContent.tsx
index 57067a160..3d1c794cb 100644
--- a/src/components/modals/webApp/MoreAppsTabContent.tsx
+++ b/src/components/modals/webApp/MoreAppsTabContent.tsx
@@ -1,4 +1,3 @@
-import type { FC } from '../../../lib/teact/teact';
import {
memo,
useCallback,
@@ -34,10 +33,10 @@ type StateProps = {
const LESS_GRID_ITEMS_AMOUNT = 5;
const runThrottled = throttle((cb) => cb(), 500, true);
-const MoreAppsTabContent: FC = ({
+const MoreAppsTabContent = ({
foundIds,
recentBotIds,
-}) => {
+}: StateProps) => {
const oldLang = useOldLang();
const lang = useLang();
const [shouldShowMoreMine, setShouldShowMoreMine] = useState(false);
diff --git a/src/components/modals/webApp/WebAppModal.async.tsx b/src/components/modals/webApp/WebAppModal.async.tsx
index d4e346b5a..b8a900642 100644
--- a/src/components/modals/webApp/WebAppModal.async.tsx
+++ b/src/components/modals/webApp/WebAppModal.async.tsx
@@ -1,12 +1,10 @@
-import type { FC } from '../../../lib/teact/teact';
-
import type { OwnProps } from './WebAppModal';
import { Bundles } from '../../../util/moduleLoader';
import useModuleLoader from '../../../hooks/useModuleLoader';
-const WebAppModalAsync: FC = (props) => {
+const WebAppModalAsync = (props: OwnProps) => {
const { modal } = props;
const WebAppModal = useModuleLoader(Bundles.Extra, 'WebAppModal', !modal?.isModalOpen);
diff --git a/src/components/payment/PaymentModal.async.tsx b/src/components/payment/PaymentModal.async.tsx
index 129a28d4c..c98a61c31 100644
--- a/src/components/payment/PaymentModal.async.tsx
+++ b/src/components/payment/PaymentModal.async.tsx
@@ -1,12 +1,10 @@
-import type { FC } from '../../lib/teact/teact';
-
import type { OwnProps } from './PaymentModal';
import { Bundles } from '../../util/moduleLoader';
import useModuleLoader from '../../hooks/useModuleLoader';
-const PaymentModalAsync: FC = (props) => {
+const PaymentModalAsync = (props: OwnProps) => {
const { isOpen } = props;
const PaymentModal = useModuleLoader(Bundles.Extra, 'PaymentModal', !isOpen);
diff --git a/src/components/payment/ReceiptModal.async.tsx b/src/components/payment/ReceiptModal.async.tsx
index a448a3299..3123b239e 100644
--- a/src/components/payment/ReceiptModal.async.tsx
+++ b/src/components/payment/ReceiptModal.async.tsx
@@ -1,12 +1,10 @@
-import type { FC } from '../../lib/teact/teact';
-
import type { OwnProps } from './ReceiptModal';
import { Bundles } from '../../util/moduleLoader';
import useModuleLoader from '../../hooks/useModuleLoader';
-const ReceiptModalAsync: FC = (props) => {
+const ReceiptModalAsync = (props: OwnProps) => {
const { isOpen } = props;
const ReceiptModal = useModuleLoader(Bundles.Extra, 'ReceiptModal', !isOpen);
diff --git a/src/components/right/CreateTopic.async.tsx b/src/components/right/CreateTopic.async.tsx
index ff35e760a..c5a3ce5c3 100644
--- a/src/components/right/CreateTopic.async.tsx
+++ b/src/components/right/CreateTopic.async.tsx
@@ -1,5 +1,3 @@
-import type { FC } from '../../lib/teact/teact';
-
import type { OwnProps } from './CreateTopic';
import { Bundles } from '../../util/moduleLoader';
@@ -8,7 +6,7 @@ import useModuleLoader from '../../hooks/useModuleLoader';
import Loading from '../ui/Loading';
-const CreateTopicAsync: FC = (props) => {
+const CreateTopicAsync = (props: OwnProps) => {
const CreateTopic = useModuleLoader(Bundles.Extra, 'CreateTopic');
return CreateTopic ? : ;
diff --git a/src/components/right/EditTopic.async.tsx b/src/components/right/EditTopic.async.tsx
index c20399eeb..bfe7903f4 100644
--- a/src/components/right/EditTopic.async.tsx
+++ b/src/components/right/EditTopic.async.tsx
@@ -1,5 +1,3 @@
-import type { FC } from '../../lib/teact/teact';
-
import type { OwnProps } from './EditTopic';
import { Bundles } from '../../util/moduleLoader';
@@ -8,7 +6,7 @@ import useModuleLoader from '../../hooks/useModuleLoader';
import Loading from '../ui/Loading';
-const EditTopicAsync: FC = (props) => {
+const EditTopicAsync = (props: OwnProps) => {
const EditTopic = useModuleLoader(Bundles.Extra, 'EditTopic');
return EditTopic ? : ;
diff --git a/src/components/right/GifSearch.async.tsx b/src/components/right/GifSearch.async.tsx
index f8690ae0d..457d7e64f 100644
--- a/src/components/right/GifSearch.async.tsx
+++ b/src/components/right/GifSearch.async.tsx
@@ -1,4 +1,4 @@
-import type { FC } from '../../lib/teact/teact';
+import type { OwnProps } from './GifSearch';
import { Bundles } from '../../util/moduleLoader';
@@ -6,10 +6,11 @@ import useModuleLoader from '../../hooks/useModuleLoader';
import Loading from '../ui/Loading';
-const GifSearchAsync: FC = () => {
- const GifSearch = useModuleLoader(Bundles.Extra, 'GifSearch');
+const GifSearchAsync = (props: OwnProps) => {
+ const { isActive } = props;
+ const GifSearch = useModuleLoader(Bundles.Extra, 'GifSearch', !isActive);
- return GifSearch ? : ;
+ return GifSearch ? : ;
};
export default GifSearchAsync;
diff --git a/src/components/right/GifSearch.tsx b/src/components/right/GifSearch.tsx
index 36ddd5f6f..f141f6545 100644
--- a/src/components/right/GifSearch.tsx
+++ b/src/components/right/GifSearch.tsx
@@ -30,7 +30,7 @@ import Loading from '../ui/Loading';
import './GifSearch.scss';
-type OwnProps = {
+export type OwnProps = {
onClose: NoneToVoidFunction;
isActive: boolean;
};
diff --git a/src/components/right/PollResults.async.tsx b/src/components/right/PollResults.async.tsx
index ee42d80c1..3ef1de7f6 100644
--- a/src/components/right/PollResults.async.tsx
+++ b/src/components/right/PollResults.async.tsx
@@ -1,4 +1,4 @@
-import type { FC } from '../../lib/teact/teact';
+import type { OwnProps } from './PollResults';
import { Bundles } from '../../util/moduleLoader';
@@ -6,10 +6,11 @@ import useModuleLoader from '../../hooks/useModuleLoader';
import Loading from '../ui/Loading';
-const PollResultsAsync: FC = () => {
- const PollResults = useModuleLoader(Bundles.Extra, 'PollResults');
+const PollResultsAsync = (props: OwnProps) => {
+ const { isActive } = props;
+ const PollResults = useModuleLoader(Bundles.Extra, 'PollResults', !isActive);
- return PollResults ? : ;
+ return PollResults ? : ;
};
export default PollResultsAsync;
diff --git a/src/components/right/PollResults.tsx b/src/components/right/PollResults.tsx
index 9bf3bcbc2..9dd08dffc 100644
--- a/src/components/right/PollResults.tsx
+++ b/src/components/right/PollResults.tsx
@@ -1,4 +1,3 @@
-import type { FC } from '../../lib/teact/teact';
import { memo } from '../../lib/teact/teact';
import { withGlobal } from '../../global';
@@ -18,7 +17,7 @@ import PollAnswerResults from './PollAnswerResults';
import './PollResults.scss';
-type OwnProps = {
+export type OwnProps = {
isActive: boolean;
onClose: NoneToVoidFunction;
};
@@ -29,13 +28,13 @@ type StateProps = {
poll?: ApiPoll;
};
-const PollResults: FC = ({
+const PollResults = ({
isActive,
chat,
message,
poll,
onClose,
-}) => {
+}: OwnProps & StateProps) => {
const lang = useOldLang();
useHistoryBack({
diff --git a/src/components/right/StickerSearch.async.tsx b/src/components/right/StickerSearch.async.tsx
index c8d060ad3..224701831 100644
--- a/src/components/right/StickerSearch.async.tsx
+++ b/src/components/right/StickerSearch.async.tsx
@@ -1,4 +1,4 @@
-import type { FC } from '../../lib/teact/teact';
+import type { OwnProps } from './StickerSearch';
import { Bundles } from '../../util/moduleLoader';
@@ -6,10 +6,11 @@ import useModuleLoader from '../../hooks/useModuleLoader';
import Loading from '../ui/Loading';
-const StickerSearchAsync: FC = () => {
- const StickerSearch = useModuleLoader(Bundles.Extra, 'StickerSearch');
+const StickerSearchAsync = (props: OwnProps) => {
+ const { isActive } = props;
+ const StickerSearch = useModuleLoader(Bundles.Extra, 'StickerSearch', !isActive);
- return StickerSearch ? : ;
+ return StickerSearch ? : ;
};
export default StickerSearchAsync;
diff --git a/src/components/right/StickerSearch.tsx b/src/components/right/StickerSearch.tsx
index bdc748350..3420f6620 100644
--- a/src/components/right/StickerSearch.tsx
+++ b/src/components/right/StickerSearch.tsx
@@ -1,4 +1,3 @@
-import type { FC } from '../../lib/teact/teact';
import {
memo, useEffect, useRef,
} from '../../lib/teact/teact';
@@ -16,7 +15,7 @@ import StickerSetResult from './StickerSetResult';
import './StickerSearch.scss';
-type OwnProps = {
+export type OwnProps = {
onClose: NoneToVoidFunction;
isActive: boolean;
};
@@ -32,14 +31,14 @@ const INTERSECTION_THROTTLE = 200;
const runThrottled = throttle((cb) => cb(), 60000, true);
-const StickerSearch: FC = ({
+const StickerSearch = ({
isActive,
query,
featuredIds,
resultIds,
isModalOpen,
onClose,
-}) => {
+}: OwnProps & StateProps) => {
const { loadFeaturedStickers } = getActions();
const containerRef = useRef();
diff --git a/src/components/right/management/Management.async.tsx b/src/components/right/management/Management.async.tsx
index 740ade6c3..75dd8502f 100644
--- a/src/components/right/management/Management.async.tsx
+++ b/src/components/right/management/Management.async.tsx
@@ -1,5 +1,3 @@
-import type { FC } from '../../../lib/teact/teact';
-
import type { OwnProps } from './Management';
import { Bundles } from '../../../util/moduleLoader';
@@ -8,7 +6,7 @@ import useModuleLoader from '../../../hooks/useModuleLoader';
import Loading from '../../ui/Loading';
-const ManagementAsync: FC = (props) => {
+const ManagementAsync = (props: OwnProps) => {
const Management = useModuleLoader(Bundles.Extra, 'Management');
return Management ? : ;
diff --git a/src/components/right/statistics/MessageStatistics.async.tsx b/src/components/right/statistics/MessageStatistics.async.tsx
index 27ffd98da..fb8564345 100644
--- a/src/components/right/statistics/MessageStatistics.async.tsx
+++ b/src/components/right/statistics/MessageStatistics.async.tsx
@@ -1,5 +1,3 @@
-import type { FC } from '../../../lib/teact/teact';
-
import type { OwnProps } from './MessageStatistics';
import { Bundles } from '../../../util/moduleLoader';
@@ -8,7 +6,7 @@ import useModuleLoader from '../../../hooks/useModuleLoader';
import Loading from '../../ui/Loading';
-const MessageStatisticsAsync: FC = (props) => {
+const MessageStatisticsAsync = (props: OwnProps) => {
const MessageStatistics = useModuleLoader(Bundles.Extra, 'MessageStatistics');
return MessageStatistics ? : ;
diff --git a/src/components/right/statistics/Statistics.async.tsx b/src/components/right/statistics/Statistics.async.tsx
index d7ed8fffc..160df703a 100644
--- a/src/components/right/statistics/Statistics.async.tsx
+++ b/src/components/right/statistics/Statistics.async.tsx
@@ -1,5 +1,3 @@
-import type { FC } from '../../../lib/teact/teact';
-
import type { OwnProps } from './Statistics';
import { Bundles } from '../../../util/moduleLoader';
@@ -8,7 +6,7 @@ import useModuleLoader from '../../../hooks/useModuleLoader';
import Loading from '../../ui/Loading';
-const StatisticsAsync: FC = (props) => {
+const StatisticsAsync = (props: OwnProps) => {
const Statistics = useModuleLoader(Bundles.Extra, 'Statistics');
return Statistics ? : ;
diff --git a/src/components/right/statistics/StoryStatistics.async.tsx b/src/components/right/statistics/StoryStatistics.async.tsx
index 97616f3e2..1f1d25a49 100644
--- a/src/components/right/statistics/StoryStatistics.async.tsx
+++ b/src/components/right/statistics/StoryStatistics.async.tsx
@@ -1,5 +1,3 @@
-import type { FC } from '../../../lib/teact/teact';
-
import type { OwnProps } from './StoryStatistics';
import { Bundles } from '../../../util/moduleLoader';
@@ -8,7 +6,7 @@ import useModuleLoader from '../../../hooks/useModuleLoader';
import Loading from '../../ui/Loading';
-const StoryStatisticsAsync: FC = (props) => {
+const StoryStatisticsAsync = (props: OwnProps) => {
const StoryStatistics = useModuleLoader(Bundles.Extra, 'StoryStatistics');
return StoryStatistics ? : ;
diff --git a/src/components/test/Test.tsx b/src/components/test/Test.tsx
index da58f7281..6e8e9851a 100644
--- a/src/components/test/Test.tsx
+++ b/src/components/test/Test.tsx
@@ -1,4 +1,3 @@
-import type { FC } from '../../lib/teact/teact';
import { useState } from '../../lib/teact/teact';
import { withGlobal } from '../../global';
@@ -14,7 +13,7 @@ type StateProps = {
let lastTimeout: number | undefined;
-const Test: FC = ({ authState, globalRand }) => {
+const Test = ({ authState, globalRand }: StateProps) => {
// eslint-disable-next-line no-console
console.log('rendering `Test`', authState, globalRand);
diff --git a/src/components/test/TestControlledInput.tsx b/src/components/test/TestControlledInput.tsx
index b9eaf87cd..1c9b3e224 100644
--- a/src/components/test/TestControlledInput.tsx
+++ b/src/components/test/TestControlledInput.tsx
@@ -1,8 +1,6 @@
-import type { FC } from '../../lib/teact/teact';
-import type React from '../../lib/teact/teact';
import { useState } from '../../lib/teact/teact';
-const Test: FC = () => {
+const Test = () => {
const [inputValue, setInputValue] = useState('Controlled');
const [isCheckboxAllowed, setIsCheckboxAllowed] = useState(true);
const [isChecked, setIsChecked] = useState(true);
diff --git a/src/components/test/TestPortal.tsx b/src/components/test/TestPortal.tsx
index a5db5c8e9..e8b01d921 100644
--- a/src/components/test/TestPortal.tsx
+++ b/src/components/test/TestPortal.tsx
@@ -1,4 +1,3 @@
-import type { FC } from '../../lib/teact/teact';
import { useState } from '../../lib/teact/teact';
import Portal from '../ui/Portal';
@@ -17,7 +16,7 @@ const StateChecker = () => {
);
};
-const TestPortal: FC = () => {
+const TestPortal = () => {
const [value, setValue] = useState(0);
const position = 100 + Math.round(Math.random() * 300);
diff --git a/src/components/test/TestSetContent.tsx b/src/components/test/TestSetContent.tsx
index bcea49a06..5f9678b99 100644
--- a/src/components/test/TestSetContent.tsx
+++ b/src/components/test/TestSetContent.tsx
@@ -1,11 +1,10 @@
-import type { FC } from '../../lib/teact/teact';
import { useState } from '../../lib/teact/teact';
// 1. Make sure "First line" is rendered even if followed by a component with single text.
// 2. Make sure it then can be normally removed (target is preserved).
// 3. Make sure "Last line" is also rendered.
-const Text: FC = () => {
+const Text = () => {
return 'text component';
};
diff --git a/src/components/ui/MenuItem.tsx b/src/components/ui/MenuItem.tsx
index 1fa46178f..ea323171c 100644
--- a/src/components/ui/MenuItem.tsx
+++ b/src/components/ui/MenuItem.tsx
@@ -1,5 +1,3 @@
-import type { FC } from '../../lib/teact/teact';
-
import type { IconName } from '../../types/icons';
import { IS_TEST } from '../../config';
@@ -17,9 +15,6 @@ export type MenuItemProps = {
customIcon?: React.ReactNode;
className?: string;
children: React.ReactNode;
- onClick?: (e: React.SyntheticEvent, arg?: number) => void;
- clickArg?: number;
- onContextMenu?: (e: React.UIEvent) => void;
href?: string;
rel?: string;
target?: string;
@@ -29,6 +24,9 @@ export type MenuItemProps = {
ariaLabel?: string;
withWrap?: boolean;
withPreventDefaultOnMouseDown?: boolean;
+ clickArg?: number;
+ onClick?: (e: React.SyntheticEvent, arg?: number) => void;
+ onContextMenu?: (e: React.UIEvent) => void;
} & ({
icon: 'A' | 'K';
isCharIcon: true;
@@ -37,14 +35,13 @@ export type MenuItemProps = {
isCharIcon?: false;
});
-const MenuItem: FC = (props) => {
+const MenuItem = (props: MenuItemProps) => {
const {
icon,
isCharIcon,
customIcon,
className,
children,
- onClick,
href,
target,
download,
@@ -53,9 +50,10 @@ const MenuItem: FC = (props) => {
ariaLabel,
withWrap,
rel = 'noopener noreferrer',
- onContextMenu,
- clickArg,
withPreventDefaultOnMouseDown,
+ clickArg,
+ onClick,
+ onContextMenu,
} = props;
const lang = useLang();
diff --git a/src/components/ui/ProgressSpinner.tsx b/src/components/ui/ProgressSpinner.tsx
index 8ff42ac3f..c3ddd0951 100644
--- a/src/components/ui/ProgressSpinner.tsx
+++ b/src/components/ui/ProgressSpinner.tsx
@@ -1,5 +1,3 @@
-import type { FC } from '../../lib/teact/teact';
-import type React from '../../lib/teact/teact';
import { memo, useEffect, useRef } from '../../lib/teact/teact';
import { requestMutation } from '../../lib/fasterdom/fasterdom';
@@ -14,6 +12,17 @@ import Icon from '../common/icons/Icon';
import './ProgressSpinner.scss';
+type OwnProps = {
+ progress?: number;
+ size?: 's' | 'm' | 'l' | 'xl';
+ square?: boolean;
+ transparent?: boolean;
+ noCross?: boolean;
+ rotationOffset?: number;
+ withColor?: boolean;
+ onClick?: (e: React.MouseEvent) => void;
+};
+
const SIZES = {
s: 42, m: 48, l: 54, xl: 52,
};
@@ -25,16 +34,7 @@ const MAX_PROGRESS = 1;
const GROW_DURATION = 600; // 0.6 s
const ROTATE_DURATION = 2000; // 2 s
-const ProgressSpinner: FC<{
- progress?: number;
- size?: 's' | 'm' | 'l' | 'xl';
- square?: boolean;
- transparent?: boolean;
- noCross?: boolean;
- rotationOffset?: number;
- withColor?: boolean;
- onClick?: (e: React.MouseEvent) => void;
-}> = ({
+const ProgressSpinner = ({
progress = 0,
size = 'l',
square,
@@ -43,7 +43,7 @@ const ProgressSpinner: FC<{
rotationOffset,
withColor,
onClick,
-}) => {
+}: OwnProps) => {
const canvasRef = useRef();
const width = SIZES[size];
const progressRef = useStateRef(progress);
diff --git a/src/components/ui/RippleEffect.tsx b/src/components/ui/RippleEffect.tsx
index de9dec9ac..1fa2a81c8 100644
--- a/src/components/ui/RippleEffect.tsx
+++ b/src/components/ui/RippleEffect.tsx
@@ -1,5 +1,3 @@
-import type { FC } from '../../lib/teact/teact';
-import type React from '../../lib/teact/teact';
import { memo, useMemo, useState } from '../../lib/teact/teact';
import { debounce } from '../../util/schedulers';
@@ -16,7 +14,7 @@ interface Ripple {
const ANIMATION_DURATION_MS = 700;
-const RippleEffect: FC = () => {
+const RippleEffect = () => {
const [ripples, setRipples] = useState([]);
const cleanUpDebounced = useMemo(() => {
diff --git a/src/components/ui/Select.tsx b/src/components/ui/Select.tsx
index 17c04dc99..ea40b558e 100644
--- a/src/components/ui/Select.tsx
+++ b/src/components/ui/Select.tsx
@@ -1,5 +1,5 @@
import type { ChangeEvent } from 'react';
-import type { ElementRef, FC } from '../../lib/teact/teact';
+import type { ElementRef } from '../../lib/teact/teact';
import type React from '../../lib/teact/teact';
import { memo } from '../../lib/teact/teact';
@@ -17,7 +17,7 @@ type OwnProps = {
children: React.ReactNode;
};
-const Select: FC = (props) => {
+const Select = (props: OwnProps) => {
const {
id,
value,
diff --git a/src/components/ui/Spinner.tsx b/src/components/ui/Spinner.tsx
index 6ea25cd80..59ea72518 100644
--- a/src/components/ui/Spinner.tsx
+++ b/src/components/ui/Spinner.tsx
@@ -1,18 +1,18 @@
-import type { FC } from '../../lib/teact/teact';
-
import buildClassName from '../../util/buildClassName';
import './Spinner.scss';
-const Spinner: FC<{
+type OwnProps = {
color?: 'blue' | 'white' | 'black' | 'green' | 'gray' | 'yellow';
backgroundColor?: 'light' | 'dark';
className?: string;
-}> = ({
+};
+
+const Spinner = ({
color = 'blue',
backgroundColor,
className,
-}) => {
+}: OwnProps) => {
return (