Skip to content

Commit ed23527

Browse files
committed
refactor: renaming stuff
1 parent 9f254ff commit ed23527

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/components/Header/NavBar.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ const NavBar = () => {
3939
const dispatch = useAppDispatch()
4040
const { enqueueSnackbar } = useSnackbar()
4141

42-
const [modalDeleteGameOpen, updateModalDeleteGameOpen] = useState(false)
42+
const [modalDeleteGameOpen, setModalDeleteGameOpen] = useState(false)
4343
const isGameActive = useAppSelector(getIsGameActive)
4444
const gameId = useAppSelector(state => state.game.id)
4545
const iamAdmin = useAppSelector(getIamAdmin)
4646
const [showSettings, setShowSettings] = useState(false)
4747
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null)
48-
const [modalLeaderboard, updateModalLeaderboard] = useState(false)
48+
const [modalLeaderboard, setModalLeaderboard] = useState(false)
4949

5050
const deleteGame = useCallback(() => {
5151
if (!gameId) {
@@ -65,14 +65,14 @@ const NavBar = () => {
6565
}, [dispatch, enqueueSnackbar, navigate, gameId])
6666

6767
const showDeleteGameModal = () => {
68-
updateModalDeleteGameOpen(true)
68+
setModalDeleteGameOpen(true)
6969
handleClose()
7070
}
7171

7272
const handleCloseDeleteGameModal = useCallback(() => {
73-
updateModalDeleteGameOpen(false)
73+
setModalDeleteGameOpen(false)
7474
handleClose()
75-
}, [updateModalDeleteGameOpen])
75+
}, [setModalDeleteGameOpen])
7676

7777
const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {
7878
setAnchorEl(event.currentTarget)
@@ -83,7 +83,7 @@ const NavBar = () => {
8383
}
8484

8585
const toggleLeaderboardModal = useCallback(() => {
86-
updateModalLeaderboard(!modalLeaderboard)
86+
setModalLeaderboard(!modalLeaderboard)
8787
handleClose()
8888
}, [modalLeaderboard])
8989

0 commit comments

Comments
 (0)