WIP ESLint
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-03-28 12:12:11 +01:00
parent 9a905e83f7
commit 3bf8859ff9
20 changed files with 129 additions and 70 deletions

View File

@ -25,7 +25,7 @@ interface DetailsProps {
}
export function NetworkDetails(p: DetailsProps): React.ReactElement {
const [nicsList, setNicsList] = React.useState<string[] | any>();
const [nicsList, setNicsList] = React.useState<string[] | undefined>();
const load = async () => {
setNicsList(await ServerApi.GetNetworksList());
@ -36,7 +36,7 @@ export function NetworkDetails(p: DetailsProps): React.ReactElement {
loadKey={"1"}
load={load}
errMsg="Failed to load the list of host network cards!"
build={() => <NetworkDetailsInner nicsList={nicsList} {...p} />}
build={() => <NetworkDetailsInner nicsList={nicsList!} {...p} />}
/>
);
}
@ -306,7 +306,7 @@ function IPSection(p: {
p.config!.nat = [];
} else {
if (
(p.config?.nat?.length ?? 0 > 0) &&
(p.config?.nat?.length ?? 0) > 0 &&
!(await confirm(
`Do you really want to disable IPv${p.version} NAT port forwarding on this network? Specific configuration will be deleted!`
))