handling button toggle tutorial
This commit is contained in:
parent
02f72ffb97
commit
6ab8aaa2c9
|
|
@ -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>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user