This commit is contained in:
@@ -9,7 +9,7 @@ export function VMScreenshot(p: { vm: VMInfo }): React.ReactElement {
|
||||
string | undefined
|
||||
>();
|
||||
|
||||
const int = React.useRef<any | undefined>(undefined);
|
||||
const int = React.useRef<NodeJS.Timeout | undefined>(undefined);
|
||||
|
||||
React.useEffect(() => {
|
||||
const refresh = async () => {
|
||||
@@ -25,7 +25,9 @@ export function VMScreenshot(p: { vm: VMInfo }): React.ReactElement {
|
||||
|
||||
if (int.current === undefined) {
|
||||
refresh();
|
||||
int.current = setInterval(() => refresh(), 5000);
|
||||
int.current = setInterval(() => {
|
||||
refresh();
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
return () => {
|
||||
|
||||
Reference in New Issue
Block a user