Local modifications to ClusterLabs/Anvil by Alteeve
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.
 
 
 
 
 
 

40 lines
992 B

import { ReactElement, useMemo } from 'react';
import CommonFenceInputGroup from './CommonFenceInputGroup';
import Spinner from '../Spinner';
const EditFenceInputGroup = <M extends Record<string, string>>({
fenceId,
fenceTemplate: externalFenceTemplate,
formUtils,
loading: isExternalLoading,
previousFenceName,
previousFenceParameters,
}: EditFenceInputGroupProps<M>): ReactElement => {
const content = useMemo(
() =>
isExternalLoading ? (
<Spinner />
) : (
<CommonFenceInputGroup
fenceId={fenceId}
fenceTemplate={externalFenceTemplate}
formUtils={formUtils}
previousFenceName={previousFenceName}
previousFenceParameters={previousFenceParameters}
/>
),
[
externalFenceTemplate,
fenceId,
formUtils,
isExternalLoading,
previousFenceName,
previousFenceParameters,
],
);
return <>{content}</>;
};
export default EditFenceInputGroup;