Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upcoming: [M3-8062] - Replace PG feature flag restriction with useIsPlacementGroupsEnabled #10431

Merged
merged 2 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Upcoming Features
---

Replace remaining feature flag implementation with useIsPlacementGroupsEnabled utility function ([#10431](https://github.com/linode/manager/pull/10431))
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { RegionSelect } from 'src/components/RegionSelect/RegionSelect';
import { sxEdgeIcon } from 'src/components/RegionSelect/RegionSelect.styles';
import { TooltipIcon } from 'src/components/TooltipIcon';
import { Typography } from 'src/components/Typography';
import { useIsPlacementGroupsEnabled } from 'src/features/PlacementGroups/utils';
import { useFlags } from 'src/hooks/useFlags';
import { useRegionsQuery } from 'src/queries/regions/regions';
import { useTypeQuery } from 'src/queries/types';
Expand Down Expand Up @@ -57,7 +58,7 @@ export const ConfigureForm = React.memo((props: Props) => {
} = props;

const flags = useFlags();
const showPlacementGroups = Boolean(flags.placementGroups?.enabled);
const { isPlacementGroupsEnabled } = useIsPlacementGroupsEnabled();
const { data: regions } = useRegionsQuery();

const { data: currentLinodeType } = useTypeQuery(
Expand Down Expand Up @@ -194,7 +195,7 @@ export const ConfigureForm = React.memo((props: Props) => {
{...panelPrice(selectedRegion, selectedRegionPrice, 'new')}
/>
)}
{showPlacementGroups && (
{isPlacementGroupsEnabled && (
<PlacementGroupsSelect
handlePlacementGroupChange={(placementGroup) => {
handlePlacementGroupSelection(placementGroup);
Expand Down
Loading