handling button toggle tutorial

This commit is contained in:
Antoine M 2024-03-19 15:55:02 +01:00
parent 02f72ffb97
commit 6ab8aaa2c9

View File

@ -1,9 +1,16 @@
import React from "react";
import helpIcon from "../../assets/img/icons/help-icon.svg";
import { useGame } from "../../hooks/useGame";
export default function Help() {
const { hasCheckedTutorial, setHasCheckedTutorial } = useGame();
return (
<div className='help'>
<button
className='help'
title="afficher l'aide"
onClick={() => setHasCheckedTutorial(!hasCheckedTutorial)}>
<img className='help__icon' src={helpIcon} alt='' />
</div>
</button>
);
}