diff --git a/src/pages/student-dashboard/StoryPage.tsx b/src/pages/student-dashboard/StoryPage.tsx index ac6ea6b..a92b71b 100644 --- a/src/pages/student-dashboard/StoryPage.tsx +++ b/src/pages/student-dashboard/StoryPage.tsx @@ -334,7 +334,7 @@ export function StoryPage() {
{/* Imagem da página atual */} - {story.content.pages[currentPage].image && ( + {story.content?.pages?.[currentPage]?.image && (
- {story.content.pages[currentPage].text} + {story.content?.pages?.[currentPage]?.text || 'Carregando...'}

{/* Gravador de áudio */} diff --git a/src/pages/student-dashboard/StudentDashboardPage.tsx b/src/pages/student-dashboard/StudentDashboardPage.tsx index 0e5b604..4a6972a 100644 --- a/src/pages/student-dashboard/StudentDashboardPage.tsx +++ b/src/pages/student-dashboard/StudentDashboardPage.tsx @@ -231,7 +231,7 @@ export function StudentDashboardPage() { className="bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden cursor-pointer hover:shadow-md transition" onClick={() => navigate(`/aluno/historias/${story.id}`)} > - {story.content.pages[0].image && ( + {story.content?.pages?.[0]?.image && ( {story.title} navigate(`/aluno/historias/${story.id}`)} > - {story.content.pages[0].image && ( + {story.content?.pages?.[0]?.image && (