mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
@@ -18,10 +18,13 @@ function LessonSkeleton() {
|
||||
|
||||
/**
|
||||
* Props:
|
||||
* lesson — { id, title, blocks[] }
|
||||
* loading — true while fetch is in-flight
|
||||
* lesson — { id, title, blocks[] }
|
||||
* loading — true while fetch is in-flight
|
||||
* showHeader — render the title/description/objectives block. Set false
|
||||
* when the caller already renders its own lesson header
|
||||
* above (e.g. LessonDetails), to avoid showing it twice.
|
||||
*/
|
||||
const LessonBlock = ({ lesson, loading = false }) => {
|
||||
const LessonBlock = ({ lesson, loading = false, showHeader = true }) => {
|
||||
if (!lesson && !loading) {
|
||||
return (
|
||||
<div className="h-full w-full flex items-center justify-center text-muted-foreground py-20">
|
||||
@@ -41,6 +44,7 @@ const LessonBlock = ({ lesson, loading = false }) => {
|
||||
lesson={lesson}
|
||||
blocks={lesson.blocks ?? []}
|
||||
empty="No content blocks yet."
|
||||
showHeader={showHeader}
|
||||
/>
|
||||
</div>
|
||||
</PreviewChrome>
|
||||
|
||||
Reference in New Issue
Block a user