diff --git a/src/components/shared/ExerciseSide.tsx b/src/components/shared/ExerciseSide.tsx index 9117613..51926a7 100644 --- a/src/components/shared/ExerciseSide.tsx +++ b/src/components/shared/ExerciseSide.tsx @@ -9,6 +9,7 @@ import GraphExercise from './Exercises/GraphExercise'; import GraphInput from './Exercises/GraphInput'; //import AxisParent from './Exercises/AxisParent'; import UnitCircleExercise from './Exercises/UnitCircleExercise'; +import UnitCircleInput from './Exercises/UnitCircleInput'; ('./Exercises/AxisExercise'); interface ExerciseSideProps { @@ -17,12 +18,12 @@ interface ExerciseSideProps { function ExerciseSide({ incrementExercise }: ExerciseSideProps): JSX.Element { const [completeExercises, setCompleteExercises] = useState(0); - type availableExercises = 'axis' | 'congrats' | 'circle' | 'graph'; + type availableExercises = 'axis' | 'congrats' | 'graph' | 'unitcircle'; const exercises: availableExercises[] = [ 'axis', 'graph', - 'circle', + 'unitcircle', 'congrats', ]; let curExercise; @@ -129,7 +130,7 @@ function ExerciseSide({ incrementExercise }: ExerciseSideProps): JSX.Element { /> ); - } else if (exercises[completeExercises] === 'circle') { + } else if (exercises[completeExercises] === 'unitcircle') { curExercise = (
+ { + setCompleteExercises(completeExercises + 1); + incrementExercise(); + return; + }} + />
); } + return (
{curExercise}
diff --git a/src/components/shared/Exercises/UnitCircleInput.tsx b/src/components/shared/Exercises/UnitCircleInput.tsx index 5fbf37a..2fbb833 100644 --- a/src/components/shared/Exercises/UnitCircleInput.tsx +++ b/src/components/shared/Exercises/UnitCircleInput.tsx @@ -1,7 +1,11 @@ //import { useState } from 'react'; import '../../../styles/Exercises/UnitCircleInput.scss'; -function UnitCircleInput(): JSX.Element { +interface UnitCircleInputProps { + nextExercise: () => void; +} + +function UnitCircleInput({nextExercise}:UnitCircleInputProps): JSX.Element { return (
@@ -37,6 +41,11 @@ function UnitCircleInput(): JSX.Element { //value={inputText[id]} />

+
+ +
);