This commit is contained in:
@ -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!`
|
||||
))
|
||||
|
Reference in New Issue
Block a user