From ddb8ceda0a0d24713f11f0cb019322fe2571d90b Mon Sep 17 00:00:00 2001
From: Arik Chakma
Date: Wed, 15 Jan 2025 17:49:59 +0600
Subject: [PATCH] wip
---
src/api/course.ts | 11 +++++------
.../CourseLanding/CourseLanding.tsx | 19 +++++++------------
2 files changed, 12 insertions(+), 18 deletions(-)
diff --git a/src/api/course.ts b/src/api/course.ts
index 8bb681f15..33b7dba68 100644
--- a/src/api/course.ts
+++ b/src/api/course.ts
@@ -12,19 +12,18 @@ export type AllowedCourseDifficulty =
export interface CourseDocument {
_id: string;
- title: string;
slug: string;
+ title: string;
description?: string;
- difficulty?: AllowedCourseDifficulty;
-
- briefTitle?: string;
- briefDescription?: string;
+ detailedDescription?: string;
- creatorId: string;
+ difficulty?: AllowedCourseDifficulty;
willLearn?: string[];
prerequisites?: string[];
+ creatorId: string;
+
// AI Configurations
setting: {
prompt?: string;
diff --git a/src/components/CourseLanding/CourseLanding.tsx b/src/components/CourseLanding/CourseLanding.tsx
index ebd136ab3..9d49d9228 100644
--- a/src/components/CourseLanding/CourseLanding.tsx
+++ b/src/components/CourseLanding/CourseLanding.tsx
@@ -47,8 +47,7 @@ export function CourseLanding(props: CourseLandingProps) {
title,
chapters,
description,
- briefDescription,
- briefTitle,
+ detailedDescription,
difficulty,
updatedAt,
rating,
@@ -89,7 +88,7 @@ export function CourseLanding(props: CourseLandingProps) {
{title}
- {briefTitle}
+ {title}
- {briefDescription && (
-
+ {description && (
+
)}
- {averageRating}
- ({rating.count} ratings)
+ {averageRating}
@@ -148,10 +143,10 @@ export function CourseLanding(props: CourseLandingProps) {
)}
- {description && (
+ {detailedDescription && (
-
+
)}