Skip to content

Commit 7ef3bc6

Browse files
authored
Merge pull request #197 from daithihearn/minor-refactor
Minor refactor
2 parents 9f254ff + f6b6a1a commit 7ef3bc6

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "frontend",
3-
"version": "7.4.4",
3+
"version": "7.4.5",
44
"description": "React frontend for the Cards 110",
55
"author": "Daithi Hearn",
66
"license": "MIT",

public/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"short_name": "Cards 110",
33
"name": "Cards 110",
4-
"version": "7.4.4",
4+
"version": "7.4.5",
55
"icons": [
66
{
77
"src": "./assets/favicon.png",

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)