From 20bad44d7e8a48ee58747ff139d9e74b744c5e79 Mon Sep 17 00:00:00 2001
From: NotAmaia <012.sva@gmail.com>
Date: Sat, 25 May 2024 10:07:57 -0700
Subject: [PATCH 1/3] added wrong message to graphs
---
src/components/shared/Exercises/GraphInput.tsx | 17 +++++++++++++++--
src/styles/Exercises/GraphInput.scss | 14 ++++++++++++--
2 files changed, 27 insertions(+), 4 deletions(-)
diff --git a/src/components/shared/Exercises/GraphInput.tsx b/src/components/shared/Exercises/GraphInput.tsx
index b3d9a39..bbc58e7 100644
--- a/src/components/shared/Exercises/GraphInput.tsx
+++ b/src/components/shared/Exercises/GraphInput.tsx
@@ -1,5 +1,5 @@
//import { useState } from 'react';
-//import { useState } from 'react';
+import { useState } from 'react';
import '../../../styles/Exercises/GraphInput.scss';
interface GraphQuestionData {
@@ -105,7 +105,7 @@ function GraphInput({
//console.log(i);
if (!i) {
//console.log(`${i} is incorrect`);
- //setWrong(true);
+ setWrong(true);
return;
}
}
@@ -113,6 +113,16 @@ function GraphInput({
nextExercise();
};
+ function wrongMessage(isWrong: boolean) {
+ if (isWrong) {
+ return "That's not quite right. Try again!";
+ } else {
+ return;
+ }
+ }
+
+ const [wrong, setWrong] = useState(false);
+
const makeLine = (
data: GraphLineData,
setCorrect: (id: number, value: boolean) => void
@@ -128,6 +138,9 @@ function GraphInput({
{questionArray.map((x) => makeLine(x, setValueCorrect))}
+
+
+
-
+
Date: Tue, 28 May 2024 18:42:48 -0700
Subject: [PATCH 3/3] shifted graph
---
src/components/shared/ExerciseSide.tsx | 2 +-
src/components/shared/Exercises/GraphExercise.tsx | 2 +-
src/styles/Exercises/GraphInput.scss | 2 +-
src/styles/Graph.scss | 6 +++---
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/components/shared/ExerciseSide.tsx b/src/components/shared/ExerciseSide.tsx
index 069adf7..2617d1a 100644
--- a/src/components/shared/ExerciseSide.tsx
+++ b/src/components/shared/ExerciseSide.tsx
@@ -142,7 +142,7 @@ ExerciseSideProps): JSX.Element {
pointerOrientation={45}
/>
-