Skip to content

Commit

Permalink
fix: use correct flag name (#5026)
Browse files Browse the repository at this point in the history
Fixes a bug with using the wrong feature name

Signed-off-by: andreas-unleash <[email protected]>
  • Loading branch information
andreas-unleash authored Oct 13, 2023
1 parent 9c047e0 commit ff97dfd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
DELETE_FEATURE,
UPDATE_FEATURE,
} from 'component/providers/AccessProvider/permissions';
import ToastRenderer from '../../common/ToastRenderer/ToastRenderer';
import { testServerRoute, testServerSetup } from '../../../utils/testServer';
import ToastRenderer from 'component/common/ToastRenderer/ToastRenderer';
import { testServerRoute, testServerSetup } from 'utils/testServer';

const mockedFeatures = [
{
Expand Down Expand Up @@ -54,7 +54,7 @@ const Component = () => {

const server = testServerSetup();

const setupApi = (disableAllEnvsOnRevive = false) => {
const setupApi = (disableEnvsOnRevive = false) => {
testServerRoute(
server,
'/api/admin/projects/default/revive',
Expand All @@ -66,7 +66,7 @@ const setupApi = (disableAllEnvsOnRevive = false) => {
testServerRoute(server, '/api/admin/ui-config', {
environment: 'Open Source',
flags: {
disableAllEnvsOnRevive,
disableEnvsOnRevive,
},
});
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const ArchivedFeatureReviveConfirm = ({
}: IArchivedFeatureReviveConfirmProps) => {
const { setToastData, setToastApiError } = useToast();
const { reviveFeatures } = useProjectApi();
const disableAllEnvsOnRevive = useUiFlag('disableAllEnvsOnRevive');
const disableAllEnvsOnRevive = useUiFlag('disableEnvsOnRevive');

const onReviveFeatureToggle = async () => {
try {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/interfaces/uiConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export type UiFlags = {
datadogJsonTemplate?: boolean;
dependentFeatures?: boolean;
internalMessageBanners?: boolean;
disableAllEnvsOnRevive?: boolean;
disableEnvsOnRevive?: boolean;
};

export interface IVersionInfo {
Expand Down

0 comments on commit ff97dfd

Please sign in to comment.