🚸 (js) Improve phone number parsing
This commit is contained in:
@ -6,8 +6,8 @@
|
||||
"types": "./src/index.ts",
|
||||
"scripts": {
|
||||
"preview": "concurrently \"pnpm run watch\" \"sleep 5 && pnpm run serve\" -n \"watch,serve\" -c \"bgBlue.bold,bgMagenta.bold\"",
|
||||
"watch": "tsx watch ./preview.tsx --clear-screen=false",
|
||||
"serve": "http-server dist -a localhost -p 3223 -o",
|
||||
"watch": "tsx watch ./src/preview.tsx --clear-screen=false",
|
||||
"serve": "http-server dist -a localhost -p 3223 -o -c-1",
|
||||
"lint": "eslint \"src/**/*.ts*\""
|
||||
},
|
||||
"keywords": [],
|
||||
|
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import { Head, Text, Button } from '../components'
|
||||
import {
|
||||
Mjml,
|
||||
@ -25,12 +24,11 @@ export const DefaultBotNotificationEmail = ({
|
||||
<MjmlBody width={600}>
|
||||
<MjmlSection padding="32px" cssClass="smooth" border="1px solid #e2e8f0">
|
||||
<MjmlColumn>
|
||||
<Text padding="0">Your typebot has collected a new response! 🥳</Text>
|
||||
{Object.keys(answers).map((key) => {
|
||||
{Object.keys(answers).map((key, index) => {
|
||||
const isEmail = emailRegex.test(answers[key])
|
||||
|
||||
return (
|
||||
<Text key={key}>
|
||||
<Text key={key} paddingTop={index === 0 ? 0 : undefined}>
|
||||
<b>{key}</b>:{' '}
|
||||
{isEmail ? (
|
||||
<a href={`mailto:${answers[key]}`}>{answers[key]}</a>
|
||||
|
Reference in New Issue
Block a user