({
content,
nextContent,
}: {
nextContent: {
id: number;
type: string;
title: string;
} | null;
content: {
type: 'video' | 'appx';
id: number;
title: string;
description: string;
thumbnail: string;
slides?: string;
markAsCompleted: boolean;
bookmark: Bookmark | null;
courseId: string;
};
})
| 128 | }; |
| 129 | |
| 130 | export const ContentRenderer = async ({ |
| 131 | content, |
| 132 | nextContent, |
| 133 | }: { |
| 134 | nextContent: { |
| 135 | id: number; |
| 136 | type: string; |
| 137 | title: string; |
| 138 | } | null; |
| 139 | content: { |
| 140 | type: 'video' | 'appx'; |
| 141 | id: number; |
| 142 | title: string; |
| 143 | description: string; |
| 144 | thumbnail: string; |
| 145 | slides?: string; |
| 146 | markAsCompleted: boolean; |
| 147 | bookmark: Bookmark | null; |
| 148 | courseId: string; |
| 149 | }; |
| 150 | }) => { |
| 151 | const metadata = await getMetadata(content.id); |
| 152 | const result = await getAppxCourseId(content.courseId); |
| 153 | const appxCourseId = typeof result !== 'string' ? '' : result; |
| 154 | |
| 155 | // @ts-ignore |
| 156 | const appxVideoId: string = metadata?.appxVideoJSON?.[appxCourseId] ?? ''; |
| 157 | |
| 158 | return ( |
| 159 | <div> |
| 160 | <ContentRendererClient |
| 161 | nextContent={nextContent} |
| 162 | metadata={metadata} |
| 163 | content={{ ...content, appxVideoId, appxCourseId }} |
| 164 | /> |
| 165 | </div> |
| 166 | ); |
| 167 | }; |
nothing calls this directly
no test coverage detected