mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
working on course details again
Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { useState, useCallback, useEffect, useRef } from "react";
|
||||
import AppBreadcrumb from "@/components/generic/Breadcrumb/AppBreadcrumb";
|
||||
import { useParams, useNavigate, useLocation, useBlocker } from "react-router-dom";
|
||||
import { House, TableOfContents, ArrowRight, ClipboardList, GraduationCap, Trophy, Lock, CheckCircle2, Circle, Zap, ListChecks, ChevronsLeft, ChevronsRight } from "lucide-react";
|
||||
import { House, TableOfContents, ArrowRight, ClipboardList, GraduationCap, Trophy, Lock, CheckCircle2, Circle, Zap, ListChecks, ChevronsLeft, ChevronsRight, Hourglass } from "lucide-react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
Accordion,
|
||||
@@ -726,6 +726,26 @@ const UnitList = () => {
|
||||
);
|
||||
}
|
||||
|
||||
// ── Content not ready (duration_seconds === 0 — no lesson content authored yet) ──
|
||||
if (!courseLoading && course && !course.duration_seconds) {
|
||||
return (
|
||||
<div className="flex flex-col items-center gap-6 py-32 text-center px-4">
|
||||
<div className="h-16 w-16 rounded-full bg-muted flex items-center justify-center">
|
||||
<Hourglass className="size-7 text-muted-foreground" />
|
||||
</div>
|
||||
<div className="space-y-2 max-w-sm">
|
||||
<h2 className="text-xl font-semibold">Course Not Yet Available</h2>
|
||||
<p className="text-sm text-muted-foreground leading-relaxed">
|
||||
This course is currently being prepared. Please check back later.
|
||||
</p>
|
||||
</div>
|
||||
<Button variant="outline" onClick={() => navigate(`/course/${courseId}`)} className="gap-1.5">
|
||||
Back to Course Details
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<PageMeta title={pageTitle} />
|
||||
|
||||
Reference in New Issue
Block a user