import React, { useEffect, useState } from 'react';
import './App.css';
const App = () => {
const [showPopup, setShowPopup] = useState(false);
useEffect(() => {
const timer = setTimeout(() => {
setShowPopup(true);
}, 1000);
return () => clearTimeout(timer);
}, []);
return (
<div className="App">
{showPopup && (
<div className="popup">
<div className="rank">1st</div>
<img src="https://placehold.co/150x150" alt="Trophy" className="trophy" />
</div>
)}
</div>
);
};
export default App;