2
0

feat: Add first name for support bubble

This commit is contained in:
Baptiste Arnaud
2022-03-27 11:32:03 +02:00
parent f9a30bc4ca
commit 47403e32b3
2 changed files with 5 additions and 1 deletions

View File

@@ -32,7 +32,7 @@ export const SupportBubble = () => {
}, },
hiddenVariables: { hiddenVariables: {
'User ID': user?.id, 'User ID': user?.id,
Name: user?.name ?? undefined, 'First name': user?.name?.split(' ')[0] ?? undefined,
Email: user?.email ?? undefined, Email: user?.email ?? undefined,
'Typebot ID': typebot?.id, 'Typebot ID': typebot?.id,
'Avatar URL': user?.image ?? undefined, 'Avatar URL': user?.image ?? undefined,

View File

@@ -167,6 +167,10 @@ export const TypebotContext = ({
new Date(typebot.updatedAt) > new Date(typebot.updatedAt) >
new Date(currentTypebotRef.current.updatedAt) new Date(currentTypebotRef.current.updatedAt)
) { ) {
console.log(
new Date(typebot.updatedAt),
new Date(currentTypebotRef.current.updatedAt)
)
setLocalTypebot({ ...typebot }) setLocalTypebot({ ...typebot })
} }