diff --git a/src/components/shared/LessonSide/LessonSide.tsx b/src/components/shared/LessonSide/LessonSide.tsx index 1158d08..252106f 100644 --- a/src/components/shared/LessonSide/LessonSide.tsx +++ b/src/components/shared/LessonSide/LessonSide.tsx @@ -12,12 +12,17 @@ interface lessonSideProps { maxLevel: number; } +function getRandomNumber(min: number, max: number): number { + return Math.floor(Math.random() * (max - min + 1)) + min; +} + function LessonSide({ levelNum, updateLevel, maxLevel, }: lessonSideProps): JSX.Element { const lesson_info = LessonSideContent[levelNum] || []; + const randomTurtleMessage = getRandomNumber(1, 7); // console.log("max:" + maxLevel); return (
@@ -33,7 +38,7 @@ function LessonSide({
- + {/* passed from parent component */}