diff --git a/frontend/src/component/changeRequest/ChangeRequestOverview/ChangeRequestOverview.tsx b/frontend/src/component/changeRequest/ChangeRequestOverview/ChangeRequestOverview.tsx index fb613e6c26..dbe21e4ad6 100644 --- a/frontend/src/component/changeRequest/ChangeRequestOverview/ChangeRequestOverview.tsx +++ b/frontend/src/component/changeRequest/ChangeRequestOverview/ChangeRequestOverview.tsx @@ -86,12 +86,12 @@ export const ChangeRequestOverview: FC = () => { const { isChangeRequestConfiguredForReview } = useChangeRequestsEnabled(projectId); + const scheduleChangeRequests = useUiFlag('scheduledConfigurationChanges'); + if (!changeRequest) { return null; } - const scheduleChangeRequests = useUiFlag('scheduledConfigurationChanges'); - const allowChangeRequestActions = isChangeRequestConfiguredForReview( changeRequest.environment, );