diff --git a/app/[locale]/course/[moduleIndex]/[lessonIndex]/page.tsx b/app/[locale]/course/[moduleIndex]/[lessonIndex]/page.tsx index 926480a..374d004 100644 --- a/app/[locale]/course/[moduleIndex]/[lessonIndex]/page.tsx +++ b/app/[locale]/course/[moduleIndex]/[lessonIndex]/page.tsx @@ -1,8 +1,8 @@ "use client"; -import { useEffect } from "react"; +import { useEffect, useState } from "react"; import { useParams, useRouter } from "next/navigation"; -import { Link } from "@/i18n/navigation"; +import { Link, useTranslation } from "@/i18n/navigation"; import { VideoPlayer } from "@/app/components/course/VideoPlayer"; import { LessonMarkdown } from "./LessonMarkdown"; import { getLesson } from "@/config/lessons"; @@ -14,6 +14,8 @@ import Header from "@/app/components/Header"; export default function LessonPage() { const params = useParams(); const router = useRouter(); + const { t } = useTranslation("community"); + const [toast, setToast] = useState(false); const moduleIndex = Number(params.moduleIndex); const lessonIndex = Number(params.lessonIndex); @@ -149,6 +151,14 @@ export default function LessonPage() { )} + {toast && ( +
{t(`links.${key}.desc`)}
+ {t(`links.${key}.label`)} +- {t("joinDesc")} -
-{t(`links.${key}.desc`)}
- - {t(`links.${key}.label`)} - -- {t(`days.${d.day}.desc`)} -
- - {t("viewDetails")} - - - ))} - -- {t("ebook.desc")} -
- - {t("ebook.cta")} - - ++ {t(`days.${d.day}.desc`)} +
+ + {t("viewDetails")} + + + ))} +- {t("course.desc")} -
- - {t("course.cta")} - ++ {t("ebook.desc")} +
+ + {t("ebook.cta")} + + + ++ {t("course.desc")} +
+ +