Skip to content

Commit

Permalink
fix: fix copy functionality always being disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaanus committed Oct 24, 2023
1 parent 90296be commit b47dbd3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions frontend/src/component/feature/CopyFeature/CopyFeature.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ export const CopyFeatureToggle = () => {
const [apiError, setApiError] = useState('');
const [nameError, setNameError] = useState<string | undefined>();
const [newToggleName, setNewToggleName] = useState<string>();
const { cloneFeatureToggle, validateFeatureToggleName } = useFeatureApi();
const {
cloneFeatureToggle,
validateFeatureToggleName,
} = useFeatureApi();
const featureId = useRequiredPathParam('featureId');
const projectId = useRequiredPathParam('projectId');
const { feature } = useFeature(projectId, featureId);
Expand Down Expand Up @@ -134,7 +137,7 @@ export const CopyFeatureToggle = () => {
show={<Alert severity='error'>{apiError}</Alert>}
/>
<ConditionallyRender
condition={Boolean(isChangeRequestConfiguredInAnyEnv)}
condition={isChangeRequestConfiguredInAnyEnv()}
show={
<StyledAlert severity='error'>
Copy functionality is disabled for this project because
Expand Down

0 comments on commit b47dbd3

Please sign in to comment.