Scheduling infrastructure for absolutely everyone.
Fixes Dynamic Link description Logic (#4351)
Syed Ali Shahbaz9557c1818b2e
diff --git a/apps/web/components/eventtype/EventTypeDescriptionSafeHTML.tsx b/apps/web/components/eventtype/EventTypeDescriptionSafeHTML.tsxindex 0ce3f8636f5..d60a64019c3 100644--- a/apps/web/components/eventtype/EventTypeDescriptionSafeHTML.tsx+++ b/apps/web/components/eventtype/EventTypeDescriptionSafeHTML.tsx@@ -1,13 +1,11 @@export type EventTypeDescriptionSafeProps = {- eventType: { description: string | null; isDynamic?: boolean };+ eventType: { description: string | null };};export const EventTypeDescriptionSafeHTML = ({ eventType }: EventTypeDescriptionSafeProps) => {const props: JSX.IntrinsicElements["div"] = { suppressHydrationWarning: true };// @ts-expect-error: @see packages/prisma/middleware/eventTypeDescriptionParseAndSanitize.tsif (eventType.description) props.dangerouslySetInnerHTML = { __html: eventType.descriptionAsSafeHTML };- // Dynamic link description is not set/pulled from the DB, hence we can allow it here as is- if (eventType.isDynamic) props.dangerouslySetInnerHTML = { __html: eventType.description || "" };return <div {...props} />;};diff --git a/packages/lib/defaultEvents.ts b/packages/lib/defaultEvents.tsindex 1f5d4a5ab74..1f2a64e8d77 100644--- a/packages/lib/defaultEvents.ts+++ b/packages/lib/defaultEvents.ts@@ -93,6 +93,7 @@ const min15Event = {title: "15min",eventName: "Dynamic Collective 15min Event",description: "Dynamic Collective 15min Event",+ descriptionAsSafeHTML: "Dynamic Collective 15min Event",position: 0,...commons,};@@ -102,6 +103,7 @@ const min30Event = {title: "30min",eventName: "Dynamic Collective 30min Event",description: "Dynamic Collective 30min Event",+ descriptionAsSafeHTML: "Dynamic Collective 30min Event",position: 1,...commons,};@@ -111,6 +113,7 @@ const min60Event = {title: "60min",eventName: "Dynamic Collective 60min Event",description: "Dynamic Collective 60min Event",+ descriptionAsSafeHTML: "Dynamic Collective 60min Event",position: 2,...commons,};