From 1893d0006da1dcfb3147182a602bcb49a5fd51e9 Mon Sep 17 00:00:00 2001 From: mategery Date: Tue, 22 Jul 2025 18:06:01 +0200 Subject: [PATCH 1/7] [#48] Git testhttps://project.mdnd-it.cc/work_packages/48 From 6720375fa12459443ce20887e8e83006e127a770 Mon Sep 17 00:00:00 2001 From: mategery Date: Tue, 22 Jul 2025 18:07:40 +0200 Subject: [PATCH 2/7] [#48] Git testhttps://project.mdnd-it.cc/work_packages/48 --- .../src/components/PopUp/History.jsx | 59 +++++++++++++++++++ .../src/components/PopUp/RatingSet.jsx | 27 +++++++++ .../src/pages/Testing/Test.jsx | 40 ++++++++++--- 3 files changed, 117 insertions(+), 9 deletions(-) create mode 100644 SerpentRace_Frontend/src/components/PopUp/History.jsx create mode 100644 SerpentRace_Frontend/src/components/PopUp/RatingSet.jsx diff --git a/SerpentRace_Frontend/src/components/PopUp/History.jsx b/SerpentRace_Frontend/src/components/PopUp/History.jsx new file mode 100644 index 00000000..55985a21 --- /dev/null +++ b/SerpentRace_Frontend/src/components/PopUp/History.jsx @@ -0,0 +1,59 @@ +import { useState } from "react"; +import Button from "../../components/Buttons/Button"; +import InputBox from "../../components/Inputs/InputBox"; +import PopUp from "../../components/PopUp/PopUp"; + +const jatekEredmenyek = [ + { helyezes: 1, datum: "2025-03-24 14:22" }, + { helyezes: 5, datum: "2025-03-24 14:20" }, + { helyezes: 3, datum: "2025-03-24 14:18" }, + { helyezes: 4, datum: "2025-03-24 14:15" }, +]; + +export default function Test() { + const [showPopup, setShowPopup] = useState(false); + const [inputValue, setInputValue] = useState(""); + + return ( +
+ setInputValue(e.target.value)} + /> +
+ + + )} + + ); +} diff --git a/SerpentRace_Frontend/src/components/PopUp/RatingSet.jsx b/SerpentRace_Frontend/src/components/PopUp/RatingSet.jsx new file mode 100644 index 00000000..5c61f7e8 --- /dev/null +++ b/SerpentRace_Frontend/src/components/PopUp/RatingSet.jsx @@ -0,0 +1,27 @@ +// src/components/PopUp/RatingSet.jsx + +export default function RatingSet() { + // Ezeket lehet később props-ból vagy API-ból is betölteni + const stats = [ + { label: "Win Rate", value: "68%" }, + { label: "Success Rate", value: "85%" }, + { label: "My cards rate", value: "72%" }, + ]; + + return ( +
+

Statisztikák

+
+ {stats.map((stat, index) => ( +
+

{stat.label}

+ {stat.value} +
+ ))} +
+
+ ); +} diff --git a/SerpentRace_Frontend/src/pages/Testing/Test.jsx b/SerpentRace_Frontend/src/pages/Testing/Test.jsx index 6ee3b4d4..f545b1db 100644 --- a/SerpentRace_Frontend/src/pages/Testing/Test.jsx +++ b/SerpentRace_Frontend/src/pages/Testing/Test.jsx @@ -1,6 +1,3 @@ -// src/pages/Testing/Test.jsx -// itt tesztelhetjük a komponenseket illetve bármit - import { useState } from "react" import Button from "../../components/Buttons/Button" import InputBox from "../../components/Inputs/InputBox" @@ -8,10 +5,12 @@ import PopUp from "../../components/PopUp/PopUp" import Logo from "../../assets/pictures/Logo.jsx" import Navbar from "../../components/Navbar/Navbar" import Footer from "../../components/Footer/Footer.jsx" +import RatingSet from "../../components/PopUp/RatingSet" // <- statisztikai komponens export default function Test() { - const [showPopup, setShowPopup] = useState(false) - const [inputValue, setInputValue] = useState("") // input értékének tárolása + const [showRegistrationPopup, setShowRegistrationPopup] = useState(false) + const [showPreviewPopup, setShowPreviewPopup] = useState(false) // <- új state + const [inputValue, setInputValue] = useState("") return (
@@ -24,9 +23,25 @@ export default function Test() { value={inputValue} onChange={(e) => setInputValue(e.target.value)} /> -
+ + {/* Regisztrációs popup */} + {showRegistrationPopup && ( + setShowRegistrationPopup(false)}>
{/* */}

Sikeres regisztráció!

@@ -39,10 +54,17 @@ export default function Test() {

Ha nem kaptad meg a levelet, ellenőrizd a spam mappádat is!

-
)} + + {/* Előnézeti popup (RatingSet) */} + {showPreviewPopup && ( + setShowPreviewPopup(false)}> + + + )}