diff --git a/packages/ui/src/custom/org-landing-page/course-info-blocks.svelte b/packages/ui/src/custom/org-landing-page/course-info-blocks.svelte index bd353738..00176c5e 100644 --- a/packages/ui/src/custom/org-landing-page/course-info-blocks.svelte +++ b/packages/ui/src/custom/org-landing-page/course-info-blocks.svelte @@ -3,6 +3,7 @@ import { courseLandingTokens } from './course-landing-page.tokens'; import EditableLandingSection from './editable-section.svelte'; import AwardIcon from '@lucide/svelte/icons/award'; + import SafeHtmlContent from '../safe-html-content/safe-html-content.svelte'; interface Props { variant: OrgLandingPageTheme; @@ -79,7 +80,7 @@
{block.eyebrow}

{block.heading}

-
{@html block.html}
+
{/each} @@ -91,7 +92,7 @@
{block.eyebrow}

{block.heading}

-
{@html block.html}
+
{/each} @@ -114,7 +115,7 @@

{block.heading}

-
{@html block.html}
+
@@ -138,7 +139,7 @@

{block.heading}

-
{@html block.html}
+
@@ -153,7 +154,7 @@ {block.eyebrow}

{block.heading}

-
{@html block.html}
+
{/each} diff --git a/packages/ui/src/custom/org-landing-page/course-pricing.svelte b/packages/ui/src/custom/org-landing-page/course-pricing.svelte index b993405b..78d29a0f 100644 --- a/packages/ui/src/custom/org-landing-page/course-pricing.svelte +++ b/packages/ui/src/custom/org-landing-page/course-pricing.svelte @@ -5,6 +5,7 @@ import LandingButton from './landing-button.svelte'; import CheckIcon from '@lucide/svelte/icons/check'; import GiftIcon from '@lucide/svelte/icons/gift'; + import SafeHtmlContent from '../safe-html-content/safe-html-content.svelte'; interface Props { variant: OrgLandingPageTheme; @@ -80,7 +81,7 @@ {labels?.pricingRewardLabel ?? 'Bonus'} -

{pricing.reward.description}

+
{/if} diff --git a/packages/ui/src/custom/org-landing-page/embed.svelte b/packages/ui/src/custom/org-landing-page/embed.svelte index 4c4330b6..7032bb6a 100644 --- a/packages/ui/src/custom/org-landing-page/embed.svelte +++ b/packages/ui/src/custom/org-landing-page/embed.svelte @@ -2,6 +2,7 @@ import type { OrgLandingPageLabels, OrgLandingPageTheme, LandingPageEmbed } from './types'; import SecondaryActionButton from './secondary-action-button.svelte'; import EditableLandingSection from './editable-section.svelte'; + import SafeHtmlContent from '../safe-html-content/safe-html-content.svelte'; let { embed, @@ -51,7 +52,7 @@ style="border: 1px solid #262a35; background: #0f1218; box-shadow: 0 30px 90px -30px rgba(0,0,0,0.7);" >
- {@html embed.code} +
{/if} @@ -76,7 +77,7 @@ {/if} {#if embed.code}
- {@html embed.code} +
{/if} @@ -95,7 +96,7 @@ {/if} {#if embed.code}
- {@html embed.code} +
{/if} diff --git a/packages/utils/src/validation/course/course.ts b/packages/utils/src/validation/course/course.ts index 73acae88..822c771d 100644 --- a/packages/utils/src/validation/course/course.ts +++ b/packages/utils/src/validation/course/course.ts @@ -285,7 +285,7 @@ export type TCourseCreate = z.infer; export const ZCourseReward = z.object({ show: z.boolean(), - description: z.string() + description: z.string().optional() }); const METADATA_NULLABLE_STRING_KEYS = ['requirements', 'description', 'goals', 'videoUrl', 'paymentLink'] as const; @@ -320,7 +320,7 @@ function preprocessCourseMetadata(value: unknown): unknown { export const ZCourseInstructor = z.object({ name: z.string(), role: z.string(), - coursesNo: z.coerce.number(), + coursesNo: z.coerce.number().optional(), description: z.string(), imgUrl: z.string() });