diff --git a/src/components/VictoryPage/VictoryPage.js b/src/components/VictoryPage/VictoryPage.js index 9b9ebc1..62bb2ab 100644 --- a/src/components/VictoryPage/VictoryPage.js +++ b/src/components/VictoryPage/VictoryPage.js @@ -1,24 +1,43 @@ import './VictoryPage.css'; -import React from 'react'; +import React, { useState } from 'react'; import { useNavigate } from 'react-router-dom'; -import background from '../../assets/big-donut.jpg' +import background from '../../assets/big-donut.jpg'; +import Leaderboard from '../Leaderboard/Leaderboard'; export default function VictoryPage() { const navigate = useNavigate(); + const [openLeaderboard, setOpenLeaderboard] = useState(false); const handleBackToStoryClick = () => { navigate('/'); }; + const handleLeaderboardClick = () => { + setOpenLeaderboard(!openLeaderboard); + }; + return ( -
Your journey has just begun.
- +Your journey has just begun.
+ + {!openLeaderboard && ( + + )}