From 807f20674ae64572ac75277b4a0f005101f45e14 Mon Sep 17 00:00:00 2001 From: Bryan Jennings Date: Mon, 26 Sep 2022 06:03:20 -0700 Subject: [PATCH 1/6] Rename exercise props --- pages/exercises/[lessonSlug].tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pages/exercises/[lessonSlug].tsx b/pages/exercises/[lessonSlug].tsx index 3d511cef2..e08c427b7 100644 --- a/pages/exercises/[lessonSlug].tsx +++ b/pages/exercises/[lessonSlug].tsx @@ -76,8 +76,8 @@ const Exercises: React.FC> = ({ exercise={exercise} setExerciseIndex={setExerciseIndex} lessonTitle={currentLesson.title} - showPreviousButton={exerciseIndex > 0} - showSkipButton={exerciseIndex < currentExercises.length - 1} + hasPrevious={exerciseIndex > 0} + hasNext={exerciseIndex < currentExercises.length - 1} /> ) : ( > lessonTitle: string - showPreviousButton: boolean - showSkipButton: boolean + hasPrevious: boolean + hasNext: boolean } const Exercise = ({ exercise, setExerciseIndex, lessonTitle, - showPreviousButton, - showSkipButton + hasPrevious, + hasNext }: ExerciseProps) => { return (
@@ -122,7 +122,7 @@ const Exercise = ({ explanation={exercise.explanation} />
- {showPreviousButton ? ( + {hasPrevious ? (