TelegramPWA/src/components/middle/composer/AttachmentModal.async.tsx
2025-12-22 22:53:57 +01:00

15 lines
466 B
TypeScript

import type { OwnProps } from './AttachmentModal';
import { Bundles } from '../../../util/moduleLoader';
import useModuleLoader from '../../../hooks/useModuleLoader';
const AttachmentModalAsync = (props: OwnProps) => {
const { attachments } = props;
const AttachmentModal = useModuleLoader(Bundles.Extra, 'AttachmentModal', !attachments.length);
return AttachmentModal ? <AttachmentModal {...props} /> : undefined;
};
export default AttachmentModalAsync;