This commit is contained in:
@@ -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 (
|
||||
<div className="w-full h-screen flex flex-col">
|
||||
@@ -24,9 +23,25 @@ export default function Test() {
|
||||
value={inputValue}
|
||||
onChange={(e) => setInputValue(e.target.value)}
|
||||
/>
|
||||
<Button text="Regisztráció" type="button" width="w-1/2" onClick={() => setShowPopup(true)} />
|
||||
{showPopup && (
|
||||
<PopUp onClose={() => setShowPopup(false)}>
|
||||
|
||||
<div className="flex flex-col sm:flex-row sm:space-x-4 space-y-4 sm:space-y-0 w-1/2">
|
||||
<Button
|
||||
text="Regisztráció"
|
||||
type="button"
|
||||
width="w-full"
|
||||
onClick={() => setShowRegistrationPopup(true)}
|
||||
/>
|
||||
<Button
|
||||
text="Előnézet"
|
||||
type="button"
|
||||
width="w-full"
|
||||
onClick={() => setShowPreviewPopup(true)} // <- másik state trigger
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Regisztrációs popup */}
|
||||
{showRegistrationPopup && (
|
||||
<PopUp onClose={() => setShowRegistrationPopup(false)}>
|
||||
<div className="flex flex-col items-center space-y-4">
|
||||
{/* <Logo size={120} /> */}
|
||||
<h1 className="text-2xl font-bold text-center">Sikeres regisztráció!</h1>
|
||||
@@ -39,10 +54,17 @@ export default function Test() {
|
||||
<p className="text-center text-sm text-gray-500">
|
||||
Ha nem kaptad meg a levelet, ellenőrizd a spam mappádat is!
|
||||
</p>
|
||||
<Button text="Bezár" type="button" width="w-24" onClick={() => setShowPopup(false)} />
|
||||
<Button text="Bezár" type="button" width="w-24" onClick={() => setShowRegistrationPopup(false)} />
|
||||
</div>
|
||||
</PopUp>
|
||||
)}
|
||||
|
||||
{/* Előnézeti popup (RatingSet) */}
|
||||
{showPreviewPopup && (
|
||||
<PopUp onClose={() => setShowPreviewPopup(false)}>
|
||||
<RatingSet />
|
||||
</PopUp>
|
||||
)}
|
||||
</div>
|
||||
<Footer />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user