WIP ESLint fixes

This commit is contained in:
2025-03-28 11:35:51 +01:00
parent 4b9df95721
commit 9a905e83f7
40 changed files with 92 additions and 91 deletions

@ -25,13 +25,13 @@ import { VirtWebRouteContainer } from "../widgets/VirtWebRouteContainer";
import { VMStatusWidget } from "../widgets/vms/VMStatusWidget";
export function VMListRoute(): React.ReactElement {
const [groups, setGroups] = React.useState<Array<string | undefined>>();
const [groups, setGroups] = React.useState<(string | undefined)[]>();
const [list, setList] = React.useState<VMInfo[] | undefined>();
const loadKey = React.useRef(1);
const load = async () => {
const groups: Array<string | undefined> = await GroupApi.GetList();
const groups: (string | undefined)[] = await GroupApi.GetList();
const list = await VMApi.GetList();
if (list.find((v) => !v.group) !== undefined) groups.push(undefined);
@ -70,7 +70,7 @@ export function VMListRoute(): React.ReactElement {
}
function VMListWidget(p: {
groups: Array<string | undefined>;
groups: (string | undefined)[];
list: VMInfo[];
onReload: () => void;
}): React.ReactElement {
@ -125,9 +125,9 @@ function VMListWidget(p: {
>
<IconButton
size="small"
onClick={() => toggleHiddenGroup(g)}
onClick={() => { toggleHiddenGroup(g); }}
>
{!hiddenGroups?.has(g) ? (
{!hiddenGroups.has(g) ? (
<KeyboardArrowUpIcon />
) : (
<KeyboardArrowDownIcon />
@ -157,7 +157,7 @@ function VMListWidget(p: {
<TableCell>
<VMStatusWidget
vm={row}
onChange={(s) => updateVMState(row, s)}
onChange={(s) => { updateVMState(row, s); }}
/>
</TableCell>
<TableCell>