From caa48003af2908df230d2004648532e8fc32fe05 Mon Sep 17 00:00:00 2001 From: Rotimi Best Date: Mon, 15 Sep 2025 19:15:50 +0100 Subject: [PATCH] fix: include types --- apps/dashboard/src/lib/utils/types/index.ts | 32 +++++++++++---------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/apps/dashboard/src/lib/utils/types/index.ts b/apps/dashboard/src/lib/utils/types/index.ts index cef2889d..472c4a85 100644 --- a/apps/dashboard/src/lib/utils/types/index.ts +++ b/apps/dashboard/src/lib/utils/types/index.ts @@ -282,6 +282,21 @@ export interface Group_attendance { export type LessonVideoType = 'youtube' | 'generic' | 'upload'; export type LessonDocumentType = any; +export type LessonVideo = { + type: LessonVideoType; + link: string; + key?: string; + metadata?: { + svid?: string; + }; +}; +export type LessonDocument = { + type: LessonDocumentType; + name: string; + link: string; + size?: number; + key?: string; +}; export interface LessonPage { id?: string | null; @@ -294,21 +309,8 @@ export interface LessonPage { materials: { note: string; slide_url: string; - videos: Array<{ - type: LessonVideoType; - link: string; - key?: string; - metadata?: { - svid?: string; - }; - }>; - documents: Array<{ - type: LessonDocumentType; - name: string; - link: string; - size?: number; - key?: string; - }>; + videos: LessonVideo[]; + documents: LessonDocument[]; }; exercises: []; lesson_completion: LessonCompletion[];