fix(striker-ui): remove duplicate parameter in CommonUpsInputGroup

main
Tsu-ba-me 2 years ago committed by digimer
parent 80fad36ad7
commit 8fa4d3441e
  1. 14
      striker-ui/components/ManageUps/CommonUpsInputGroup.tsx
  2. 3
      striker-ui/types/CommonUpsInputGroup.d.ts

@ -5,11 +5,7 @@ import InputWithRef from '../InputWithRef';
import OutlinedInputWithLabel from '../OutlinedInputWithLabel'; import OutlinedInputWithLabel from '../OutlinedInputWithLabel';
const CommonUpsInputGroup: FC<CommonUpsInputGroupProps> = ({ const CommonUpsInputGroup: FC<CommonUpsInputGroupProps> = ({
previous: { previous: { upsIPAddress: previousIpAddress, upsName: previousUpsName } = {},
hostName: previousHostName,
ipAddress: previousIpAddress,
upsName: previousUpsName,
} = {},
}) => ( }) => (
<> <>
<Grid <Grid
@ -22,7 +18,7 @@ const CommonUpsInputGroup: FC<CommonUpsInputGroupProps> = ({
<OutlinedInputWithLabel <OutlinedInputWithLabel
id="common-ups-input-host-name" id="common-ups-input-host-name"
label="Host name" label="Host name"
value={previousHostName} value={previousUpsName}
/> />
} }
required required
@ -46,12 +42,6 @@ const CommonUpsInputGroup: FC<CommonUpsInputGroupProps> = ({
}} }}
spacing="1em" spacing="1em"
/> />
<input
hidden
id="common-ups-input-ups-name"
readOnly
value={previousUpsName}
/>
</> </>
); );

@ -1,7 +1,6 @@
type CommonUpsInputGroupOptionalProps = { type CommonUpsInputGroupOptionalProps = {
previous?: { previous?: {
hostName?: string; upsIPAddress?: string;
ipAddress?: string;
upsName?: string; upsName?: string;
}; };
}; };

Loading…
Cancel
Save