@@ -201,25 +201,31 @@ export const LessonViewer = ({
)}
{error && (
-
- {NOT_ENROLLED_HEADER}
-
-
{error}.
+
+
+ {NOT_ENROLLED_HEADER}
+
+
+
+ {error}.
+
{error === "You are not enrolled in the course" && (
-
{ENROLL_BUTTON_TEXT}
+
)}
)}
{lesson && !error && (
<>
-
{String.prototype.toUpperCase.call(
LESSON_TYPE_VIDEO,
@@ -308,6 +314,7 @@ export const LessonViewer = ({
unknown
>
}
+ theme={theme.theme}
/>
)}
@@ -335,10 +342,13 @@ export const LessonViewer = ({
lesson.media?.file && (
-
+
+
)}
@@ -349,32 +359,38 @@ export const LessonViewer = ({
{!lesson.prevLesson && (
-
-
+
+
)}
{lesson.prevLesson && (
-
{COURSE_PROGRESS_PREV}
-
+
)}
-
+
diff --git a/apps/web/components/public/lesson-viewer/quiz-viewer.tsx b/apps/web/components/public/lesson-viewer/quiz-viewer.tsx
index f0798830d..4678f07ce 100644
--- a/apps/web/components/public/lesson-viewer/quiz-viewer.tsx
+++ b/apps/web/components/public/lesson-viewer/quiz-viewer.tsx
@@ -4,7 +4,7 @@ import {
Quiz as QuizContent,
} from "@courselit/common-models";
import { FetchBuilder } from "@courselit/utils";
-import { ChangeEvent, useState } from "react";
+import { ChangeEvent, useContext, useState } from "react";
import {
TOAST_TITLE_ERROR,
QUIZ_VIEWER_EVALUATE_BTN,
@@ -13,7 +13,9 @@ import {
TOAST_QUIZ_PASS_MESSAGE,
QUIZ_SCORE_PREFIX_MESSAGE,
} from "@/ui-config/strings";
-import { Form, FormSubmit, useToast } from "@courselit/components-library";
+import { Form, useToast } from "@courselit/components-library";
+import { Button, Header2, Text1 } from "@courselit/page-primitives";
+import { ThemeContext } from "@components/contexts";
interface QuizViewerProps {
lessonId: string;
@@ -32,6 +34,7 @@ export default function QuizViewer({
]);
const [loading, setLoading] = useState(false);
const { toast } = useToast();
+ const { theme } = useContext(ThemeContext);
const setAnswerForQuestion = (
checked: boolean,
@@ -119,9 +122,9 @@ export default function QuizViewer({
);
diff --git a/apps/web/ui-config/strings.ts b/apps/web/ui-config/strings.ts
index 8f48119f1..cdbd0bb7a 100644
--- a/apps/web/ui-config/strings.ts
+++ b/apps/web/ui-config/strings.ts
@@ -72,6 +72,7 @@ export const FORM_FIELD_FEATURED_IMAGE = "Featured image";
export const BTN_DELETE_COURSE = "Delete product";
export const BTN_EXIT_COURSE = "Exit";
export const BTN_EXIT_COURSE_TOOLTIP = "Exit course";
+export const BTN_TOGGLE_THEME = "Toggle theme";
export const BTN_ADD_VIDEO = "Add";
export const ADD_VIDEO_DIALOG_TITLE = "Embed an online video";
export const LABEL_NEW_PASSWORD = "New password";