TelegramPWA/src/components/right/statistics/MessageStatistics.async.tsx
2022-05-30 15:40:11 +04:00

18 lines
629 B
TypeScript

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