fix: Experience lesson blocks rendering from content_blocks field
- Changed from lesson.metadata.blocks to lesson.content_blocks - Backend stores blocks in content_blocks column, not metadata - Fixes issue where only first block was showing in lessons with multiple exercises Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
@@ -310,9 +310,9 @@ export default function LessonPlayerPage({ params }: { params: { id: string, les
|
||||
maxAttempts={lesson.max_attempts}
|
||||
/>
|
||||
) : (
|
||||
(lesson.metadata?.blocks || []).length > 0 ? (
|
||||
(lesson.content_blocks || []).length > 0 ? (
|
||||
<div className="space-y-24">
|
||||
{lesson.metadata?.blocks?.map((block) => {
|
||||
{(lesson.content_blocks || []).map((block, index) => {
|
||||
const renderBlock = () => {
|
||||
switch (block.type) {
|
||||
case 'description':
|
||||
|
||||
Reference in New Issue
Block a user