changes
This commit is contained in:
1 parent
a99af426db
commit
8886aa8640
91 files changed
+2823
-773
No files matched your search
@@ -7,11 +7,7 @@ import { PageHero } from "@/components/molecules/PageHero";
|
||||
import { CourseRegisterGate } from "@/components/organisms/CourseRegisterGate";
|
||||
import { Separator } from "@/components/ui/separator";
|
||||
import type { Course } from "@/lib/types";
|
||||
import {
|
||||
categoryLabel,
|
||||
formatCoursePrice,
|
||||
formatLabel,
|
||||
} from "@/lib/labels";
|
||||
import { formatCoursePrice, formatLabel } from "@/lib/labels";
|
||||
import { JsonLd, courseJsonLd } from "@/lib/seo/json-ld";
|
||||
|
||||
export type CourseDetailLabels = {
|
||||
@@ -40,11 +36,13 @@ export function CourseDetailTemplate({
|
||||
labels: CourseDetailLabels;
|
||||
}) {
|
||||
const priceLabel = formatCoursePrice(course.price);
|
||||
const categoryText =
|
||||
course.categories.map((c) => c.label).join(" · ") || "—";
|
||||
const specs = [
|
||||
{
|
||||
icon: Tag,
|
||||
label: labels.category,
|
||||
value: categoryLabel(course.category),
|
||||
value: categoryText,
|
||||
},
|
||||
{
|
||||
icon: Layers,
|
||||
@@ -77,7 +75,11 @@ export function CourseDetailTemplate({
|
||||
<PageHero
|
||||
title={course.title}
|
||||
intro={course.summary}
|
||||
eyebrow={categoryLabel(course.category)}
|
||||
eyebrow={
|
||||
course.categories[0]?.label ??
|
||||
course.tags[0]?.label ??
|
||||
undefined
|
||||
}
|
||||
imageUrl={course.posterImageUrl}
|
||||
/>
|
||||
|
||||
|
||||
Reference in new issue
Block a user