timer label

This commit is contained in:
Jan Prochazka
2021-03-27 11:36:37 +01:00
parent 4f58d2ff80
commit 11985004b5
6 changed files with 107 additions and 14 deletions

View File

@@ -38,10 +38,12 @@
import memberStore from '../utility/memberStore';
import socket from '../utility/socket';
import useEffect from '../utility/useEffect';
import useTimerLabel from '../utility/useTimerLabel';
export let tabid;
const tabVisible: any = getContext('tabVisible');
const timerLabel = useTimerLabel();
let runnerId;
@@ -90,7 +92,7 @@
function handleRunnerDone() {
busy = false;
// timerLabel.stop();
timerLabel.stop();
}
// export function getStatus() {
@@ -138,14 +140,14 @@
runid = resp.data.runid;
runnerId = runid;
busy = true;
//timerLabel.start();
timerLabel.start();
}
export function kill() {
axiosInstance.post('runners/cancel', {
runid: runnerId,
});
// timerLabel.stop();
timerLabel.stop();
}
const { editorState, editorValue, setEditorData } = useEditorData({ tabid });