diff --git a/client/package.json b/client/package.json index dc3959813..e3f943e32 100644 --- a/client/package.json +++ b/client/package.json @@ -45,7 +45,6 @@ "react-icons": "^3.11.0", "react-image-file-resizer": "^0.3.6", "react-moment": "^0.9.7", - "react-number-format": "^4.4.1", "react-redux": "^7.2.1", "react-resizable": "^1.10.1", "react-router-dom": "^5.2.0", diff --git a/client/src/components/chat-open-button/chat-open-button.component.jsx b/client/src/components/chat-open-button/chat-open-button.component.jsx index 211d70852..769091a16 100644 --- a/client/src/components/chat-open-button/chat-open-button.component.jsx +++ b/client/src/components/chat-open-button/chat-open-button.component.jsx @@ -9,7 +9,10 @@ export function ChatOpenButton({ phone, jobid, openChatByPhone }) { return ( openChatByPhone({ phone_num: phone, jobid: jobid })} + onClick={(e) => { + e.stopPropagation(); + openChatByPhone({ phone_num: phone, jobid: jobid }); + }} /> ); } diff --git a/client/src/utils/PhoneFormatter.jsx b/client/src/utils/PhoneFormatter.jsx index 7a620dce8..e021626b6 100644 --- a/client/src/utils/PhoneFormatter.jsx +++ b/client/src/utils/PhoneFormatter.jsx @@ -1,13 +1,8 @@ import React from "react"; -import NumberFormat from "react-number-format"; - +//import NumberFormat from "react-number-format"; +import phone from "phone"; export default function PhoneNumberFormatter(props) { - return ( - - ); + const p = phone(props.children); + + return {p[0]}; } diff --git a/client/yarn.lock b/client/yarn.lock index 8a040559e..1f3dceb8c 100644 --- a/client/yarn.lock +++ b/client/yarn.lock @@ -11358,13 +11358,6 @@ react-moment@^0.9.7: resolved "https://registry.yarnpkg.com/react-moment/-/react-moment-0.9.7.tgz#ca570466595b1aa4f7619e62da18b3bb2de8b6f3" integrity sha512-ifzUrUGF6KRsUN2pRG5k56kO0mJBr8kRkWb0wNvtFIsBIxOuPxhUpL1YlXwpbQCbHq23hUu6A0VEk64HsFxk9g== -react-number-format@^4.4.1: - version "4.4.1" - resolved "https://registry.yarnpkg.com/react-number-format/-/react-number-format-4.4.1.tgz#d5614dd25edfc21ed48b97356213440081437a94" - integrity sha512-ZGFMXZ0U7DcmQ3bSZY3FULOA1mfqreT9NIMYZNoa/ouiSgiTQiYA95Uj2KN8ge6BRr+ghA5vraozqWqsHZQw3Q== - dependencies: - prop-types "^15.7.2" - react-overlays@^2.0.0-0: version "2.1.1" resolved "https://registry.yarnpkg.com/react-overlays/-/react-overlays-2.1.1.tgz#ffe2090c4a10da6b8947a1c7b1a67d0457648a0d"