show module actions on empty level rows
Keep course rows visible even when module count is zero so Add Module is accessible immediately, and show a clear empty-state hint before first module creation. Made-with: Cursor
This commit is contained in:
parent
6cba475145
commit
547e2c7970
|
|
@ -244,7 +244,6 @@ export function HumanLanguagePage() {
|
|||
modules: levelNode?.modules ?? [],
|
||||
}
|
||||
})
|
||||
.filter((entry) => entry.modules.length > 0)
|
||||
return (
|
||||
<Card key={level} className="overflow-hidden border-grayScale-200/80 shadow-sm">
|
||||
<button
|
||||
|
|
@ -284,7 +283,10 @@ export function HumanLanguagePage() {
|
|||
</Button>
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
{entry.modules.map((module) => (
|
||||
{entry.modules.length === 0 ? (
|
||||
<p className="text-xs text-grayScale-500">No modules yet. Use “Add Module” to start.</p>
|
||||
) : (
|
||||
entry.modules.map((module) => (
|
||||
<div key={module.id} className="rounded-lg border border-grayScale-100 bg-grayScale-50/60 p-3">
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
<p className="text-sm font-semibold text-grayScale-900">Module: {module.title}</p>
|
||||
|
|
@ -335,7 +337,8 @@ export function HumanLanguagePage() {
|
|||
</div>
|
||||
))}
|
||||
</div>
|
||||
))}
|
||||
))
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user