From 1c97e549eb4c154c3dbc7157d9917ef22fd7d350 Mon Sep 17 00:00:00 2001 From: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Date: Tue, 14 Feb 2023 13:19:45 +0000 Subject: [PATCH] Implement URL validation on default videos links (#7087) --- .../components/eventtype/EventSetupTab.tsx | 10 +++++++--- apps/web/pages/apps/installed/[category].tsx | 3 +++ .../settings/my-account/conferencing.tsx | 3 +++ packages/app-store/locations.ts | 2 +- .../components/AppSetDefaultLinkDialog.tsx | 15 ++++++++++++-- packages/trpc/server/routers/viewer.tsx | 20 +++++++++++++++++++ 6 files changed, 47 insertions(+), 6 deletions(-) diff --git a/apps/web/components/eventtype/EventSetupTab.tsx b/apps/web/components/eventtype/EventSetupTab.tsx index 83667c4ffe..5383f8f8da 100644 --- a/apps/web/components/eventtype/EventSetupTab.tsx +++ b/apps/web/components/eventtype/EventSetupTab.tsx @@ -196,6 +196,12 @@ export const EventSetupTab = ( if (!eventLocationType) { return null; } + // We dont want to translate the string link - it doesnt exist in common.json and it gets prefixed/suffixed with __ or // + const eventLabel = + eventLocationType.defaultValueVariable === "link" + ? location[eventLocationType.defaultValueVariable] + : t(location[eventLocationType.defaultValueVariable] || eventLocationType.label); + return (
  • - - {t(location[eventLocationType.defaultValueVariable] || eventLocationType.label)} - + {eventLabel}