diff --git a/src/components/story/StoryGenerator.tsx b/src/components/story/StoryGenerator.tsx index 9cec729..aab010e 100644 --- a/src/components/story/StoryGenerator.tsx +++ b/src/components/story/StoryGenerator.tsx @@ -156,7 +156,7 @@ export function StoryGenerator() { // Track story generation const selectedTheme = themes?.find(t => t.id === choices.theme_id)?.title || ''; const generationTime = Date.now() - startTime.current; - const wordCount = updatedStory.content.pages.reduce((acc, page) => + const wordCount = updatedStory.content.pages.reduce((acc: number, page: { text: string }) => acc + page.text.split(/\s+/).length, 0); trackStoryGenerated({ diff --git a/src/pages/student-dashboard/ExercisePage.tsx b/src/pages/student-dashboard/ExercisePage.tsx index 1edde6c..a219f34 100644 --- a/src/pages/student-dashboard/ExercisePage.tsx +++ b/src/pages/student-dashboard/ExercisePage.tsx @@ -138,18 +138,22 @@ export function ExercisePage() { w.word)} storyId={storyId as string} + studentId={exerciseData.story.student_id} /> ); case 'sentence-completion': return ( ); case 'pronunciation-practice': return ( w.word)} + storyId={storyId as string} + studentId={exerciseData.story.student_id} /> ); default: