mirror of
https://github.com/FranP-code/Hangman-game-with-React.git
synced 2025-10-13 00:42:32 +00:00
18 lines
371 B
JavaScript
18 lines
371 B
JavaScript
export const RecoveryCurrentCategory = (setCategory) => {
|
|
|
|
if (localStorage.getItem('category')) {
|
|
|
|
const category = localStorage.getItem('category')
|
|
|
|
console.log(category)
|
|
setCategory(category)
|
|
localStorage.removeItem('category')
|
|
|
|
if (localStorage.getItem('category') === 'false') {
|
|
|
|
//setCategory(false)
|
|
}
|
|
|
|
}
|
|
}
|