|
|
@ -0,0 +1,33 @@ |
|
|
|
import React, { useState } from "react"; |
|
|
|
import DownloadButton from "../components/DownloadButton"; |
|
|
|
|
|
|
|
function EndPage() { |
|
|
|
const [clickCount, setClickCount] = useState(0); |
|
|
|
const [buttonVisible, setButtonVisible] = useState(false); |
|
|
|
|
|
|
|
const handleTextClick = () => { |
|
|
|
const newCount = clickCount + 1; |
|
|
|
setClickCount(newCount); |
|
|
|
if (newCount >= 10) { |
|
|
|
setButtonVisible(true); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
return ( |
|
|
|
<div> |
|
|
|
<p |
|
|
|
onClick={handleTextClick} |
|
|
|
style={{ cursor: "pointer", margin: "10px auto", width: "fit-content" }} |
|
|
|
> |
|
|
|
Thank you for participating! ❤️ |
|
|
|
</p> |
|
|
|
{buttonVisible && ( |
|
|
|
<div style={{ margin: "0 auto", width: "fit-content" }}> |
|
|
|
<DownloadButton /> |
|
|
|
</div> |
|
|
|
)} |
|
|
|
</div> |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
export default EndPage; |