Skip to content
Snippets Groups Projects
Commit 6edbbcde authored by Max Rüdiger's avatar Max Rüdiger
Browse files

fix: operator go back bug

parent 7ef2d370
No related branches found
No related tags found
1 merge request!107fix: operator go back bug
Pipeline #42841 passed with warnings
......@@ -21,7 +21,7 @@ import BackspaceIcon from '@material-ui/icons/Backspace'
import ChevronLeftIcon from '@material-ui/icons/ChevronLeft'
import ChevronRightIcon from '@material-ui/icons/ChevronRight'
import TimerIcon from '@material-ui/icons/Timer'
import React, { useEffect } from 'react'
import React, { useEffect, useState } from 'react'
import { useHistory, useParams } from 'react-router-dom'
import { getPresentationCompetition, setPresentationCode } from '../../actions/presentation'
import { useAppDispatch, useAppSelector } from '../../hooks'
......@@ -92,6 +92,12 @@ const OperatorViewPage: React.FC = () => {
// console.log(id)
}, [])
window.onpopstate = () => {
//Handle browser back arrow
alert('Tävlingen avslutas för alla')
endCompetition()
}
const handleOpenPopover = (event: React.MouseEvent<HTMLButtonElement>) => {
setAnchorEl(event.currentTarget)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment