File size: 803 Bytes
f850783
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { useTranslate } from '@/hooks/common-hooks';
import { IModalProps } from '@/interfaces/common';
import { Modal, Typography } from 'antd';

import styles from './index.less';

const { Paragraph } = Typography;

const ChatIdModal = ({
  visible,
  hideModal,
  id,
}: IModalProps<any> & { id: string; name?: string; idKey: string }) => {
  const { t } = useTranslate('chat');

  return (
    <>
      <Modal
        title={t('overview')}
        open={visible}
        onCancel={hideModal}
        cancelButtonProps={{ style: { display: 'none' } }}
        onOk={hideModal}
        okText={t('close', { keyPrefix: 'common' })}
      >
        <Paragraph copyable={{ text: id }} className={styles.id}>
          {id}
        </Paragraph>
      </Modal>
    </>
  );
};

export default ChatIdModal;