This commit is contained in:
2025-07-22 18:07:40 +02:00
parent 1893d0006d
commit 6720375fa1
3 changed files with 117 additions and 9 deletions
@@ -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 (
<div className="w-full h-screen flex flex-col items-center justify-center space-y-6">
<InputBox
placeholder="E-mail cím"
type="text"
width="w-1/2"
value={inputValue}
onChange={(e) => setInputValue(e.target.value)}
/>
<Button
text="Játék Előzmények"
type="button"
width="w-1/2"
onClick={() => setShowPopup(true)}
/>
{showPopup && (
<PopUp onClose={() => setShowPopup(false)}>
<div className="p-6 w-full max-w-md">
<h1 className="text-2xl font-bold text-center mb-4">Játék Előzmények</h1>
<div className="space-y-3">
{jatekEredmenyek.map((eredmeny, index) => (
<div
key={index}
className={`flex justify-between items-center rounded-lg p-4 shadow-md ${
eredmeny.helyezes <= 3 ? "border-l-4 border-green-500" : "border-l-4 border-blue-500"
} bg-gray-50`}
>
<p className="text-gray-800 font-semibold">
Felhasználónév {eredmeny.helyezes}. helyezés
</p>
<span className="text-sm text-gray-500">{eredmeny.datum}</span>
</div>
))}
</div>
<div className="flex justify-center mt-6">
<Button text="Bezár" type="button" width="w-24" onClick={() => setShowPopup(false)} />
</div>
</div>
</PopUp>
)}
</div>
);
}
@@ -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 (
<div className="p-6 w-full max-w-md">
<h1 className="text-2xl font-bold text-center mb-4">Statisztikák</h1>
<div className="space-y-6">
{stats.map((stat, index) => (
<div
key={index}
className="flex justify-between items-center rounded-lg p-4 shadow-md bg-gray-50 border-l-4 border-indigo-500"
>
<p className="text-gray-800 font-semibold">{stat.label}</p>
<span className="text-lg font-bold text-indigo-700">{stat.value}</span>
</div>
))}
</div>
</div>
);
}