Updated frontend dependencies
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-12-03 15:13:01 +01:00
parent dfcf764a9b
commit f087b27b53
5 changed files with 360 additions and 668 deletions

View File

@@ -1,5 +1,5 @@
import { Alert, Box, Button, CircularProgress } from "@mui/material";
import { useEffect, useRef, useState } from "react";
import React from "react";
const State = {
Loading: 0,
@@ -17,9 +17,7 @@ export function AsyncWidget(p: {
ready?: boolean;
errAdditionalElement?: () => React.ReactElement;
}): React.ReactElement {
const [state, setState] = useState<number>(State.Loading);
const counter = useRef<unknown>(null);
const [state, setState] = React.useState<number>(State.Loading);
const load = async () => {
try {
@@ -32,12 +30,10 @@ export function AsyncWidget(p: {
}
};
useEffect(() => {
if (counter.current === p.loadKey) return;
counter.current = p.loadKey;
React.useEffect(() => {
load();
});
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [p.loadKey]);
if (state === State.Error)
return (