diff --git a/public/index.html b/public/index.html index aa069f2..ff3225a 100644 --- a/public/index.html +++ b/public/index.html @@ -24,7 +24,7 @@ work correctly both with client-side routing and a non-root public URL. Learn how to configure a non-root public URL by running `npm run build`. --> - React App + Marsio Kart diff --git a/public/marsiokartlogo.png b/public/marsiokartlogo.png deleted file mode 100644 index e2afd8a..0000000 Binary files a/public/marsiokartlogo.png and /dev/null differ diff --git a/src/App.test.tsx b/src/App.test.tsx index 441db62..d9df128 100644 --- a/src/App.test.tsx +++ b/src/App.test.tsx @@ -3,7 +3,7 @@ import { render, screen, fireEvent } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import App from './App'; import "@testing-library/jest-dom"; -import Hamburger from './Hamburgerbutton'; +import Hamburger from './Hamburgerbutton/Hamburgerbutton'; // remove this test when real tests are added test('renders header', () => { diff --git a/src/App.tsx b/src/App.tsx index ae13588..aa74936 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'; import './App.scss'; import Home from './Home/Home'; -import Header from './header'; +import Header from './Header/Header'; import { Quiz } from './Quiz/Quiz'; import Footer from './Footer/Footer'; @@ -12,7 +12,6 @@ function App() { return (
-

MarsioKart

{ const handleHamburgerClick = () => { @@ -9,6 +11,7 @@ const Header: React.FC = () => { return (
+ Marsio Kart Logo
); }; diff --git a/src/ImageAssets/marsiokartlogo.jpg b/src/ImageAssets/marsiokartlogo.jpg new file mode 100644 index 0000000..105b094 Binary files /dev/null and b/src/ImageAssets/marsiokartlogo.jpg differ diff --git a/src/QuestionDisplay/QuestionDisplay.scss b/src/QuestionDisplay/QuestionDisplay.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/QuestionDisplay/QuestionDisplay.tsx b/src/QuestionDisplay/QuestionDisplay.tsx new file mode 100644 index 0000000..2562141 --- /dev/null +++ b/src/QuestionDisplay/QuestionDisplay.tsx @@ -0,0 +1,22 @@ +// questions = [{"Where is Mars in the solar system?" : [{"Fourth planet from the sun" : true}, {"Next to Pluto" : false}, {"Closer to the sun than Earth" : false}]}, +// {"What is a rover?": [{"A dog" : false}, {"A robotic space vehicle" : true}, {"A type of car" : false}]}, +// {"How many rovers have NASA sent to Mars?": [{"5": true}, {"4": false}, {"20": false}]}, +// {"Which of these lists real Mars rover names?": [{"Resilience, Curiosity, Perseverance": false}, {"Sojourner, Oppertunity, Perseverance" : true}, {"Discovery, Searcher, Pioneer" : false}]}, +// {"What are the Mars rovers looking for?": [{"Ares God of War": false}, {"Dead rovers": false}, {"Water": true}]}] +// import getQuestions from './somewhere'; + +export function QuestionDisplay() { + // const questions = getQuestions(); + const questions = [{"Where is Mars in the solar system?" : [{"Fourth planet from the sun" : true}, {"Next to Pluto" : false}, {"Closer to the sun than Earth" : false}]}, + {"What is a rover?": [{"A dog" : false}, {"A robotic space vehicle" : true}, {"A type of car" : false}]}, + {"How many rovers have NASA sent to Mars?": [{"5": true}, {"4": false}, {"20": false}]}, + {"Which of these lists real Mars rover names?": [{"Resilience, Curiosity, Perseverance": false}, {"Sojourner, Opportunity, Perseverance" : true}, {"Discovery, Searcher, Pioneer" : false}]}, + {"What are the Mars rovers looking for?": [{"Ares God of War": false}, {"Dead rovers": false}, {"Water": true}]}]; + + const question = questions[Math.floor(Math.random() * questions.length)]; + + return ( + <> + ) + +} \ No newline at end of file