Fix a issue with entries not clearing on back button press
This commit is contained in:
@@ -164,7 +164,10 @@ export default function BerryDashLeaderboards () {
|
|||||||
className='button btntheme1'
|
className='button btntheme1'
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (selected == -1) router.push('/game?id=1')
|
if (selected == -1) router.push('/game?id=1')
|
||||||
else setSelected(-1)
|
else {
|
||||||
|
setSelected(-1)
|
||||||
|
setEntries([])
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
title='Click to go up a level.'
|
title='Click to go up a level.'
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user