import React from 'react'; import copy from 'copy-to-clipboard'; import { Form, Input } from "UI"; import { Button } from 'antd'; import { observer } from 'mobx-react-lite'; import { useStore } from 'App/mstore'; function TenantKey() { const [ copied, setCopied ] = React.useState(false); const { userStore } = useStore(); const tenantKey = userStore.account.tenantKey; const copyHandler = () => { setCopied(true); copy(tenantKey); setTimeout(() => { setCopied(false); }, 1000); } return ( { copied ? 'Copied' : 'Copy' } } /> ); } export default observer(TenantKey);