diff --git a/app/quiz/page.tsx b/app/quiz/page.tsx index 829bf0f..714a5b6 100644 --- a/app/quiz/page.tsx +++ b/app/quiz/page.tsx @@ -2,7 +2,7 @@ import styles from "./page.module.scss"; import { useState, useEffect, useRef } from "react"; import { useSession } from "next-auth/react"; -import { signIn, signOut } from 'next-auth/react'; +import { signIn, signOut } from "next-auth/react"; import Question from "@/components/Questioncomponent/Question"; import Quizrules from "@/components/Rulesquiz/rulesquiz"; @@ -14,7 +14,7 @@ export default function Quiz() { const animationRef = useRef(null); useEffect(() => { - if (typeof window !== 'undefined' && containerRef.current) { + if (typeof window !== "undefined" && containerRef.current) { const animation = new CarAnimation(containerRef.current); animation.start(); animationRef.current = animation; @@ -32,13 +32,17 @@ export default function Quiz() { }, [isCorrect]); return ( - <>
- {/* */} -
- -
- -
- + <> +
+ {/* */} +
+ +
+
+ ); } diff --git a/components/MainQuestion/MainQuestion.tsx b/components/MainQuestion/MainQuestion.tsx index c5776dd..6841df9 100644 --- a/components/MainQuestion/MainQuestion.tsx +++ b/components/MainQuestion/MainQuestion.tsx @@ -57,7 +57,7 @@ function MainQuestion({ isCorrect , setIsCorrect , onCorrectAnswer}: MainQuestio placeholder="Enter your answer" className={style.input} /> - + ); diff --git a/components/Map/map.jsx b/components/Map/map.jsx index b3139f5..cbdbf1f 100644 --- a/components/Map/map.jsx +++ b/components/Map/map.jsx @@ -16,7 +16,7 @@ const Map = () => { mapRef.current = new mapboxgl.Map({ container: mapContainerRef.current, center: [-74.5, 40], // starting position [lng, lat] - zoom: 9 // starting zoom + zoom: 3 // starting zoom }); }); diff --git a/components/Questioncomponent/Question.module.scss b/components/Questioncomponent/Question.module.scss index 4f576fb..ae50cb9 100644 --- a/components/Questioncomponent/Question.module.scss +++ b/components/Questioncomponent/Question.module.scss @@ -12,7 +12,7 @@ .outerquestion { height: 70vh; - width: 36%; + width: 70%; background-color: rgba(9, 255, 0, 0.89); clip-path: polygon(0 0, 91% 0, 100% 13%, 100% 100%, 16% 100%, 0 90%); display: flex; diff --git a/components/Questioncomponent/Question.tsx b/components/Questioncomponent/Question.tsx index db12b4b..7038329 100644 --- a/components/Questioncomponent/Question.tsx +++ b/components/Questioncomponent/Question.tsx @@ -4,6 +4,7 @@ import styles from "./Question.module.scss"; import { Tabs } from "../Tabs/tabs"; import MainQuestion from "../MainQuestion/MainQuestion"; import Map from "@/components/Map/map"; +import Rulescard from "../Rulescard/rulescard"; interface QuestionProps { isCorrect: boolean; @@ -12,6 +13,7 @@ interface QuestionProps { const Question: React.FC = ({ isCorrect, setIsCorrect }) => { const [tabs, setTabs] = useState([]); + const [rulesShow, setRulesShow] = useState(false); useEffect(() => { const fetchTabs = async () => { @@ -49,38 +51,66 @@ const Question: React.FC = ({ isCorrect, setIsCorrect }) => { return ( <> - + + Rules + +
+ {rulesShow && ( + + )}
-
-
+
+
-
-
-
+
+
+
+ {/* */}
diff --git a/components/Submitbutton/submitbutton.tsx b/components/Submitbutton/submitbutton.tsx index ce7dda7..4e07f98 100644 --- a/components/Submitbutton/submitbutton.tsx +++ b/components/Submitbutton/submitbutton.tsx @@ -4,7 +4,7 @@ import styles from './submit.module.scss'; export default function Submit() { return ( -