Remove unused redirects from the Next.js configuration and update package dependencies to include new Tiptap extensions for enhanced text editing capabilities. Clean up the database seeding script by removing commented-out code and ensuring proper deletion of obsolete entries. Update various pages to handle not found scenarios gracefully, improving user experience across the application.
This commit is contained in:
1 parent
4b84409ed7
commit
2858b9c746
106 files changed
+2516
-1004
No files matched your search
@@ -3,6 +3,7 @@ import { notFound } from "next/navigation";
|
||||
import { getTranslations } from "next-intl/server";
|
||||
import { CourseDetailTemplate } from "@/components/templates/CourseDetailTemplate";
|
||||
import { getCourseById } from "@/lib/data/courses";
|
||||
import { htmlToPlain } from "@/lib/html-text";
|
||||
import { pageMetadata, truncateMetaDescription } from "@/lib/seo/metadata";
|
||||
|
||||
type Props = { params: Promise<{ slug: string }> };
|
||||
@@ -15,7 +16,7 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
|
||||
return pageMetadata({
|
||||
title: course.title,
|
||||
description: truncateMetaDescription(
|
||||
course.seoDescription || course.summary,
|
||||
course.seoDescription || htmlToPlain(course.summary),
|
||||
),
|
||||
path: `/register/${pathSlug}`,
|
||||
...(course.posterImageUrl ? { image: course.posterImageUrl } : {}),
|
||||
@@ -45,6 +46,7 @@ export default async function CourseRegisterPage({ params }: Props) {
|
||||
detailsTitle: t("courseDetailsTitle"),
|
||||
aboutTitle: t("courseAboutTitle"),
|
||||
duration: t("courseDuration"),
|
||||
date: t("courseDate"),
|
||||
format: t("courseFormat"),
|
||||
category: t("courseCategory"),
|
||||
price: t("coursePrice"),
|
||||
|
||||
Reference in new issue
Block a user