✨ Add a clear leaderboard button in leaderboard component
This commit is contained in:
@@ -21,6 +21,7 @@ import CalendarIcon from '../../assets/calendar';
|
||||
import Replay from '../../assets/replay';
|
||||
import Settings from '../../assets/settings';
|
||||
import TimerIcon from '../../assets/timer';
|
||||
import Trash from '../../assets/trash';
|
||||
import './styles.scss';
|
||||
// ---------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -90,6 +91,17 @@ const LeaderBoard = () => {
|
||||
Paramètres
|
||||
</button>
|
||||
|
||||
<button
|
||||
className='controlButton clear'
|
||||
onClick={() => {
|
||||
setGameState((prev) => ({ ...prev, status: 'settings', endType: '', placedFlags: 0, bombs: 0, gameTime: '' }));
|
||||
store.setItem('leaderboard', []);
|
||||
}}
|
||||
>
|
||||
<Trash />
|
||||
Supprimer
|
||||
</button>
|
||||
|
||||
<button
|
||||
className='controlButton replay'
|
||||
onClick={() => setGameState((prev) => ({ ...prev, status: 'idle', endType: '', placedFlags: 0, bombs: 0, gameTime: '' }))}
|
||||
|
||||
Reference in New Issue
Block a user