TelegramPWA/src/components/middle/composer/BotCommandTooltip.async.tsx
2022-05-30 15:40:11 +04:00

17 lines
639 B
TypeScript

import type { FC } from '../../../lib/teact/teact';
import React, { memo } from '../../../lib/teact/teact';
import type { OwnProps } from './BotCommandTooltip';
import { Bundles } from '../../../util/moduleLoader';
import useModuleLoader from '../../../hooks/useModuleLoader';
const BotCommandTooltipAsync: FC<OwnProps> = (props) => {
const { isOpen } = props;
const BotCommandTooltip = useModuleLoader(Bundles.Extra, 'BotCommandTooltip', !isOpen);
// eslint-disable-next-line react/jsx-props-no-spreading
return BotCommandTooltip ? <BotCommandTooltip {...props} /> : undefined;
};
export default memo(BotCommandTooltipAsync);