Documentation Index
Fetch the complete documentation index at: https://mintlify.com/0xchriswilder/journey/llms.txt
Use this file to discover all available pages before exploring further.
Overview
TheLessonView component is the primary page component for displaying lesson content. It manages lesson progression, quiz completion, and navigation between lessons.
Location: src/pages/LessonView.tsx
Features
- Displays lesson content with sections, objectives, and metadata
- Integrates quiz functionality with completion tracking
- Manages lesson completion state and progress
- Provides navigation between lessons and weeks
- Shows instructor notes in instructor mode
- Triggers celebrations on lesson/quiz completion
- Auto-scrolls to top on lesson change
Component Interface
URL Parameters
The unique identifier for the week (e.g., “week1”)
The unique identifier for the lesson (e.g., “fhe-introduction”)
Dependencies
State Management
useBootcampStore- Manages completion state, quiz scores, instructor modeuseTranslatedCurriculum- Provides localized curriculum data
Data Helpers
getLessonById()- Retrieves lesson datagetWeekById()- Retrieves week datagetNextLesson()- Gets next lesson info for navigationgetPrevLesson()- Gets previous lesson info for navigationgetTotalLessons()- Returns total lesson count for progress calculation
Usage Example
Navigating to a Lesson
Key Functionality
Lesson Completion
The component handles lesson completion in two ways:- Manual Completion: User clicks “Complete and Continue” button
- Quiz Completion: Automatically completes when quiz is passed
Quiz Integration
Rendered Content
Header Section
- Week and lesson badges
- Estimated time
- Completion status
- Lesson title and description
Learning Objectives
RendersLearningObjectives component with lesson objectives and completion status.
Instructor Notes (Conditional)
ShowsInstructorNotes component when:
instructorModeis enabled- Lesson has instructor notes
Lesson Sections
Renders each section usingLessonSection component with staggered animation.
Quiz (Conditional)
RendersQuizSection component if lesson includes a quiz:
Navigation
- Back Button: Returns to week overview
- Previous Lesson: Navigates to previous lesson (if available)
- Complete/Next Button: Completes lesson and navigates forward
State Management
Local State
No local state - relies entirely on:- URL parameters
- Global bootcamp store
- Curriculum data
Side Effects
Error Handling
Displays fallback UI when lesson/week not found:Animation
Uses Framer Motion for:- Header fade-in on load
- Staggered section animations
- Smooth transitions
Related Components
- QuizSection - Quiz rendering and interaction
LessonSection- Individual lesson section renderingLearningObjectives- Displays lesson objectivesInstructorNotes- Shows instructor-only content
See Also
- HomeworkPage - Week homework display
- Lesson Types - Lesson data structure
- Bootcamp Store - Progress tracking