You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.tsx 803B

12345678910111213141516171819202122232425262728293031323334
  1. import { useTranslate } from '@/hooks/common-hooks';
  2. import { IModalProps } from '@/interfaces/common';
  3. import { Modal, Typography } from 'antd';
  4. import styles from './index.less';
  5. const { Paragraph } = Typography;
  6. const ChatIdModal = ({
  7. visible,
  8. hideModal,
  9. id,
  10. }: IModalProps<any> & { id: string; name?: string; idKey: string }) => {
  11. const { t } = useTranslate('chat');
  12. return (
  13. <>
  14. <Modal
  15. title={t('overview')}
  16. open={visible}
  17. onCancel={hideModal}
  18. cancelButtonProps={{ style: { display: 'none' } }}
  19. onOk={hideModal}
  20. okText={t('close', { keyPrefix: 'common' })}
  21. >
  22. <Paragraph copyable={{ text: id }} className={styles.id}>
  23. {id}
  24. </Paragraph>
  25. </Modal>
  26. </>
  27. );
  28. };
  29. export default ChatIdModal;