diff --git a/src/app/(main)/(pages)/question/page.tsx b/src/app/(main)/(pages)/question/page.tsx index e050f3a00..f56133f33 100644 --- a/src/app/(main)/(pages)/question/page.tsx +++ b/src/app/(main)/(pages)/question/page.tsx @@ -235,8 +235,8 @@ export default async function QuestionsPage({ ))} { - //@ts-ignore - response?.data?.length > 10 && ( + + response?.data && response.data.length > 10 && ( ) } diff --git a/src/app/admin/content/[courseId]/page.tsx b/src/app/admin/content/[courseId]/page.tsx index a3ce253bc..dc5a9668c 100644 --- a/src/app/admin/content/[courseId]/page.tsx +++ b/src/app/admin/content/[courseId]/page.tsx @@ -51,13 +51,13 @@ export default async function UpdateCourseContent({ /> ({ + + courseContent={Array.isArray(courseContent?.value) ? courseContent?.value.map((x: any) => ({ title: x?.title || '', image: x?.thumbnail || '', id: x?.id || 0, createdAt: x?.createdAt, - }))} + })) : []} courseId={parseInt(courseId, 10)} />