diff --git a/components/common/CopyComponent.tsx b/components/common/CopyComponent.tsx index 2f789ca1..950bc2a0 100644 --- a/components/common/CopyComponent.tsx +++ b/components/common/CopyComponent.tsx @@ -18,7 +18,7 @@ const CopyToClipboard: React.FC = ({ number, id }) => { event.preventDefault() event.stopPropagation() - navigator.clipboard.writeText(number).then(() => { + navigator.clipboard.writeText(number?.trim()).then(() => { setShowMessage(true) setTimeout(() => setShowMessage(false), 2000) }) diff --git a/components/phonebook/ContactSummary.tsx b/components/phonebook/ContactSummary.tsx index a11912a0..f0907f11 100644 --- a/components/phonebook/ContactSummary.tsx +++ b/components/phonebook/ContactSummary.tsx @@ -459,11 +459,13 @@ export const ContactSummary = forwardRef {contact?.workemail} + {/* copy component */} + diff --git a/components/settings/Integrations.tsx b/components/settings/Integrations.tsx index fc2239d0..f57e0618 100644 --- a/components/settings/Integrations.tsx +++ b/components/settings/Integrations.tsx @@ -10,7 +10,6 @@ import { } from '@fortawesome/free-solid-svg-icons' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { Button, InlineNotification, Modal } from '../common' -import { CopyToClipboard } from 'react-copy-to-clipboard' import { useSelector } from 'react-redux' import { RootState } from '../../store' import { newIslandConfig } from '../../lib/settings' diff --git a/package-lock.json b/package-lock.json index af34189a..b22b711c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "@nethesis/nethesis-brands-svg-icons": "github:nethesis/Font-Awesome#ns-brands", "@nethesis/nethesis-light-svg-icons": "github:nethesis/Font-Awesome#ns-light", "@nethesis/nethesis-solid-svg-icons": "github:nethesis/Font-Awesome#ns-solid", - "@nethesis/phone-island": "^0.8.21", + "@nethesis/phone-island": "^0.8.22", "@rematch/core": "^2.2.0", "@rematch/immer": "^2.1.3", "@types/crypto-js": "^4.1.1", @@ -4225,9 +4225,9 @@ } }, "node_modules/@nethesis/phone-island": { - "version": "0.8.21", - "resolved": "https://registry.npmjs.org/@nethesis/phone-island/-/phone-island-0.8.21.tgz", - "integrity": "sha512-KtsHVV0y84cshppxJ7XJfB3EIktFKQYlDtoKpDmGDpzoAzJXod9dzOJthXoUlsjEKYyuV+wMU9MNS8TGAcmdbg==", + "version": "0.8.22", + "resolved": "https://registry.npmjs.org/@nethesis/phone-island/-/phone-island-0.8.22.tgz", + "integrity": "sha512-BGLCFdE52Kpbrw1S5hPo462qjlt3T+cNH8w/XI3S8H80y0cIo94LF6i2hanT4QBDuMy6akqyki4J5hCqN8givw==", "dependencies": { "@fortawesome/free-solid-svg-icons": "^6.2.1", "@fortawesome/react-fontawesome": "^0.2.0", diff --git a/package.json b/package.json index df47c013..fe646172 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "@nethesis/nethesis-brands-svg-icons": "github:nethesis/Font-Awesome#ns-brands", "@nethesis/nethesis-light-svg-icons": "github:nethesis/Font-Awesome#ns-light", "@nethesis/nethesis-solid-svg-icons": "github:nethesis/Font-Awesome#ns-solid", - "@nethesis/phone-island": "^0.8.21", + "@nethesis/phone-island": "^0.8.22", "@rematch/core": "^2.2.0", "@rematch/immer": "^2.1.3", "@types/crypto-js": "^4.1.1",