Fixed phone # formatting issues. BOD-308

This commit is contained in:
Patrick Fic
2020-09-03 09:18:53 -07:00
parent f3b32fae76
commit 2adb72b25f
4 changed files with 9 additions and 19 deletions

View File

@@ -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 (
<NumberFormat
value={props.children}
type="tel"
format="+# (###)-###-####"
displayType={"text"}
/>
);
const p = phone(props.children);
return <span>{p[0]}</span>;
}