refining with cross
This commit is contained in:
parent
78582036e3
commit
b445a1e2cd
|
|
@ -1,17 +1,17 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useGame } from "../../hooks/useGame";
|
import { useGame } from "../../hooks/useGame";
|
||||||
import Modal from "../../components/ui/Modal.jsx";
|
import Modal from "../../components/ui/Modal.jsx";
|
||||||
|
import closeIcon from "../../assets/img/icons/icon-cross.svg";
|
||||||
|
|
||||||
export default function GameModal() {
|
export default function GameModal() {
|
||||||
const { currentGameModal, setCurrentGameModal } = useGame();
|
const { currentGameModal, setCurrentGameModal } = useGame();
|
||||||
if (!currentGameModal) return null;
|
if (!currentGameModal) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal className='game-modal' onClose={() => setCurrentGameModal(null)}>
|
<Modal className='game-modal' open={currentGameModal} onClose={() => setCurrentGameModal(null)}>
|
||||||
<button className='game-modal__close-button' onClick={() => setCurrentGameModal(null)}>
|
<button className='game-modal__close-button' onClick={() => setCurrentGameModal(null)}>
|
||||||
Close
|
<img className='close-icon' src={closeIcon} alt='close' />
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{currentGameModal}
|
{currentGameModal}
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user