WIP ESLint fixes
This commit is contained in:
virtweb_frontend
eslint.config.js
src
App.tsxindex.tsx
api
hooks
providers
routes
EditAPITokenRoute.tsxEditNWFilterRoute.tsxEditNetworkRoute.tsxEditVMRoute.tsxIsoFilesRoute.tsxNetworkFiltersListRoute.tsxSysInfoRoute.tsxVMListRoute.tsxVNCRoute.tsx
auth
widgets
@ -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>
|
||||
|
Reference in New Issue
Block a user