1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-28 19:06:12 +01:00

refactor: remove quering old features endpoint from BulkEnableDialog (#6698)

This was meant to repull the features, but we are using search, so it
was doing nothing.
I tested and features are still updated after removal.
This commit is contained in:
Jaanus Sellin 2024-03-26 22:16:23 +02:00 committed by GitHub
parent 06a70cac1c
commit 20c41ca148
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,7 +7,6 @@ import type { FeatureSchema } from 'openapi';
import { formatUnknownError } from 'utils/formatUnknownError';
import useFeatureApi from 'hooks/api/actions/useFeatureApi/useFeatureApi';
import useProject from 'hooks/api/getters/useProject/useProject';
import { useChangeRequestsEnabled } from 'hooks/useChangeRequestsEnabled';
import { useChangeRequestApi } from 'hooks/api/actions/useChangeRequestApi/useChangeRequestApi';
import { usePendingChangeRequests } from 'hooks/api/getters/usePendingChangeRequests/usePendingChangeRequests';
@ -43,7 +42,6 @@ export const BulkEnableDialog = ({
const [selected, setSelected] = useState(environments[0]);
const { bulkToggleFeaturesEnvironmentOn } = useFeatureApi();
const { addChange } = useChangeRequestApi();
const { refetch: refetchProject } = useProject(projectId);
const { setToastApiError, setToastData } = useToast();
const { isChangeRequestConfigured } = useChangeRequestsEnabled(projectId);
const { refetch: refetchChangeRequests } =
@ -85,7 +83,6 @@ export const BulkEnableDialog = ({
data.map((feature) => feature.name),
selected,
);
refetchProject();
setToastData({
text: 'Your feature toggles have been enabled',
type: 'success',