From cb83935da937dc0e872f33c4b0947bde7694b2a4 Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Sat, 28 Jan 2023 15:00:11 +0100 Subject: [PATCH] :bug: (share) Fix custom domain delete --- .../editor/providers/TypebotProvider/TypebotProvider.tsx | 2 +- apps/builder/src/features/publish/components/SharePage.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/builder/src/features/editor/providers/TypebotProvider/TypebotProvider.tsx b/apps/builder/src/features/editor/providers/TypebotProvider/TypebotProvider.tsx index 055af6368..e03cad0cd 100644 --- a/apps/builder/src/features/editor/providers/TypebotProvider/TypebotProvider.tsx +++ b/apps/builder/src/features/editor/providers/TypebotProvider/TypebotProvider.tsx @@ -52,7 +52,7 @@ type UpdateTypebotPayload = Partial<{ publicId: string name: string icon: string - customDomain: string + customDomain: string | null resultsTablePreferences: ResultsTablePreferences isClosed: boolean }> diff --git a/apps/builder/src/features/publish/components/SharePage.tsx b/apps/builder/src/features/publish/components/SharePage.tsx index b3b285e2e..dab31bf6d 100644 --- a/apps/builder/src/features/publish/components/SharePage.tsx +++ b/apps/builder/src/features/publish/components/SharePage.tsx @@ -49,7 +49,7 @@ export const SharePage = () => { handleCustomDomainChange(newDomain) } - const handleCustomDomainChange = (customDomain: string | undefined) => + const handleCustomDomainChange = (customDomain: string | null) => updateTypebot({ customDomain }) const checkIfPathnameIsValid = (pathname: string) => { @@ -116,7 +116,7 @@ export const SharePage = () => { icon={} aria-label="Remove custom domain" size="xs" - onClick={() => handleCustomDomainChange(undefined)} + onClick={() => handleCustomDomainChange(null)} /> )}