Skip to content

Commit

Permalink
Issue 54: Add level progress to selector (#66)
Browse files Browse the repository at this point in the history
* Issue 54: Add level progress to selector

* Attempt to fix github actions issues #54

* Fixed lint issues (#54)

* gitignored .idea (#54)

---------

Co-authored-by: Jonah Paten <[email protected]>
  • Loading branch information
sunnyyvinay and jpaten authored Nov 15, 2023
1 parent 4696aed commit ce81c0a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ build/
# Never commit individual sessions
.DS_Store
.vscode/
.idea/

# misc
.env.local
Expand Down
4 changes: 2 additions & 2 deletions src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import '../assets/WestwoodSans-Regular.ttf';

function App(): JSX.Element {
const [exerciseCount, setExerciseCount] = useState(0);
if (exerciseCount == 2) {
if (exerciseCount == 5) {
return (
<main>
<CongratsPage />
Expand All @@ -16,7 +16,7 @@ function App(): JSX.Element {
return (
<div>
<main>
<LessonSide />
<LessonSide levelNum={exerciseCount + 1} />
<ExerciseSide
incrementExercise={() => setExerciseCount(exerciseCount + 1)}
/>
Expand Down
10 changes: 7 additions & 3 deletions src/components/shared/LessonSide/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const exArray: { id: string; text: string }[] = [
},
];

function LessonSide(): JSX.Element {
function LessonSide(levelNum: number): JSX.Element {
return (
<section id="lesson-side-container">
<div>
Expand All @@ -34,8 +34,12 @@ function LessonSide(): JSX.Element {
<div>
<Turtle turtleID="your-genius" />

{/* don't change this next line */}
<LevelSelector numLevels={5} currentLevel={2} maxLevelReached={4} />
{/* passed from parent component */}
<LevelSelector
numLevels={6}
currentLevel={levelNum}
maxLevelReached={6}
/>
</div>
<Footer />
</section>
Expand Down

0 comments on commit ce81c0a

Please sign in to comment.