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.
37 lines
873 B
37 lines
873 B
import { FC, useMemo } from 'react'; |
|
|
|
import CommonFenceInputGroup from './CommonFenceInputGroup'; |
|
import Spinner from '../Spinner'; |
|
|
|
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;
|
|
|