You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
873 B
38 lines
873 B
2 years ago
|
import { FC, useMemo } from 'react';
|
||
|
|
||
|
import CommonFenceInputGroup from './CommonFenceInputGroup';
|
||
2 years ago
|
import Spinner from '../Spinner';
|
||
2 years ago
|
|
||
|
const EditFenceInputGroup: FC<EditFenceInputGroupProps> = ({
|
||
|
fenceId,
|
||
|
fenceTemplate: externalFenceTemplate,
|
||
|
loading: isExternalLoading,
|
||
|
previousFenceName,
|
||
|
previousFenceParameters,
|
||
|
}) => {
|
||
|
const content = useMemo(
|
||
|
() =>
|
||
|
isExternalLoading ? (
|
||
|
<Spinner />
|
||
|
) : (
|
||
|
<CommonFenceInputGroup
|
||
|
fenceId={fenceId}
|
||
|
fenceTemplate={externalFenceTemplate}
|
||
|
previousFenceName={previousFenceName}
|
||
|
previousFenceParameters={previousFenceParameters}
|
||
|
/>
|
||
|
),
|
||
|
[
|
||
|
externalFenceTemplate,
|
||
|
fenceId,
|
||
|
isExternalLoading,
|
||
|
previousFenceName,
|
||
|
previousFenceParameters,
|
||
|
],
|
||
|
);
|
||
|
|
||
|
return <>{content}</>;
|
||
|
};
|
||
|
|
||
|
export default EditFenceInputGroup;
|