From 5f3197ad4f539da20e42eed5155a3f1a582ff857 Mon Sep 17 00:00:00 2001 From: Patou Malongi Mabando Date: Thu, 9 Mar 2023 15:13:55 +0200 Subject: [PATCH] ZA2-Patou-Mabando-high-scores-react --- challenge-high-score-tables/App.js | 13 ++++ challenge-high-score-tables/index.html | 25 ++++++ challenge-high-score-tables/index.js | 5 ++ challenge-high-score-tables/scores.js | 104 +++++++++++++++++-------- challenge-high-score-tables/style.css | 27 +++++++ 5 files changed, 141 insertions(+), 33 deletions(-) create mode 100644 challenge-high-score-tables/App.js create mode 100644 challenge-high-score-tables/index.html create mode 100644 challenge-high-score-tables/index.js create mode 100644 challenge-high-score-tables/style.css diff --git a/challenge-high-score-tables/App.js b/challenge-high-score-tables/App.js new file mode 100644 index 000000000..09a79770d --- /dev/null +++ b/challenge-high-score-tables/App.js @@ -0,0 +1,13 @@ +import Header from "./components/Header"; +import Tables from "./components/Tables"; + +const App = () => { + return ( +
+
+ +
+ ); +}; + +export default App; diff --git a/challenge-high-score-tables/index.html b/challenge-high-score-tables/index.html new file mode 100644 index 000000000..dcb1ff17c --- /dev/null +++ b/challenge-high-score-tables/index.html @@ -0,0 +1,25 @@ + + + + + + + + + High Score Table + + + +

High Score Table

+ + + + \ No newline at end of file diff --git a/challenge-high-score-tables/index.js b/challenge-high-score-tables/index.js new file mode 100644 index 000000000..163b9c53a --- /dev/null +++ b/challenge-high-score-tables/index.js @@ -0,0 +1,5 @@ +import React from "react"; +import ReactDOM from "react-dom"; +import App from "./App"; +import "./Index.css"; +ReactDOM.render(, document.querySelector("#root")); \ No newline at end of file diff --git a/challenge-high-score-tables/scores.js b/challenge-high-score-tables/scores.js index b9d274e65..d2c08fc2c 100644 --- a/challenge-high-score-tables/scores.js +++ b/challenge-high-score-tables/scores.js @@ -1,34 +1,72 @@ let allCountryScores = [ - { - name: "Ethiopia", - scores: [ {n: "Sub", s: 9990}, {n: "lucy", s: "4134234"}, {n: "DWH", s: 9999}, {n: "Hanif", s: 999999999} ] - }, - { - name: "Scotland", - scores: [ {n: "groundkeeper willie", s: 4000}, {n: "Neill", s: 999999}, {n: "braveheart", s: -200}] - },{ - name: "England", - scores: [ {n: "Jonny", s: 202020}, {n: "Chris", s: 202021}] - },{ - name: "Brazil", - scores: [ {n: "Mozart", s: 999}] - }, - { - name: "Colombia", - scores: [ {n: "Maria", s: 6000}, {n: "Melanie", s: "99999999"}, {n: "Ali", s: 5000}] - }, - { - name: "Turkey", - scores: [ {n: "selim", s: 900 }, {n: "mahmut", s: 1000 }, {n: "morat", s: 999 } ] - }, - { - name: "Iran", - scores: [ {n: "arosha", s: 5550 }, {n: "zahra", s: 3000 }, {n: "nader", s: 2000 }, {n: "Bani", s: 1999 } ] - }, - { - name: "Bangladesh", - scores: [ {n: "rahman", s: 700200}, {n: "rayhan", s: 18238123}, {n: "ali", s: 5400000} ] - }, - ]; - - export default allCountryScores; + { + id: 1, + name: "Ethiopia", + scores: [ + { n: "Sub", s: 9990 }, + { n: "lucy", s: "4134234" }, + { n: "DWH", s: 9999 }, + { n: "Hanif", s: 999999999 }, + ], + }, + { + id: 2, + name: "Scotland", + scores: [ + { n: "groundkeeper willie", s: 4000 }, + { n: "Neill", s: 999999 }, + { n: "braveheart", s: -200 }, + ], + }, + { + id: 3, + name: "England", + scores: [ + { n: "Jonny", s: 202020 }, + { n: "Chris", s: 202021 }, + ], + }, + { + name: "Brazil", + scores: [{ n: "Mozart", s: 999 }], + }, + { + id: 4, + name: "Colombia", + scores: [ + { n: "Maria", s: 6000 }, + { n: "Melanie", s: "99999999" }, + { n: "Ali", s: 5000 }, + ], + }, + { + id: 5, + name: "Turkey", + scores: [ + { n: "selim", s: 900 }, + { n: "mahmut", s: 1000 }, + { n: "morat", s: 999 }, + ], + }, + { + id: 6, + name: "Iran", + scores: [ + { n: "arosha", s: 5550 }, + { n: "zahra", s: 3000 }, + { n: "nader", s: 2000 }, + { n: "Bani", s: 1999 }, + ], + }, + { + id: 7, + name: "Bangladesh", + scores: [ + { n: "rahman", s: 700200 }, + { n: "rayhan", s: 18238123 }, + { n: "ali", s: 5400000 }, + ], + }, +]; + +export default allCountryScores; diff --git a/challenge-high-score-tables/style.css b/challenge-high-score-tables/style.css new file mode 100644 index 000000000..076d30373 --- /dev/null +++ b/challenge-high-score-tables/style.css @@ -0,0 +1,27 @@ +@font-face { + font-family: "Retro"; + src: url(./Retro\ Gaming.ttf); +} + +.App { + font-family: "Retro"; +} + +button { + width: 200px; + background-color: black; + height: 50px; + color: white; + font-family: "Retro"; + font-size: 2rem; + cursor: pointer; +} + +span { + color: brown; +} + +h1{ + font-family: "Retro"; + color: rgb(26, 63, 63); +} \ No newline at end of file