mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-23 00:22:19 +01:00
fix: route for environments for pro customers (#8390)
This commit is contained in:
parent
48eee2043f
commit
18ae49900b
@ -42,7 +42,7 @@ export const EnvironmentTable = () => {
|
||||
const { environments, mutateEnvironments } = useEnvironments();
|
||||
const [purchaseDialogOpen, setPurchaseDialogOpen] = useState(false);
|
||||
const isFeatureEnabled = useUiFlag('EEA');
|
||||
const isPurchaseAdditionalEnvronmentsEnabled = useUiFlag(
|
||||
const isPurchaseAdditionalEnvironmentsEnabled = useUiFlag(
|
||||
'purchaseAdditionalEnvironments',
|
||||
);
|
||||
const { isPro } = useUiConfig();
|
||||
@ -121,7 +121,7 @@ export const EnvironmentTable = () => {
|
||||
<PageHeader title={`Environments (${count})`} actions={headerActions} />
|
||||
);
|
||||
|
||||
if (!isFeatureEnabled && !isPurchaseAdditionalEnvronmentsEnabled) {
|
||||
if (!isFeatureEnabled && !isPurchaseAdditionalEnvironmentsEnabled) {
|
||||
return (
|
||||
<PageContent header={header}>
|
||||
<PremiumFeature feature='environments' />
|
||||
@ -131,7 +131,7 @@ export const EnvironmentTable = () => {
|
||||
|
||||
return (
|
||||
<PageContent header={header}>
|
||||
{isPro() && isPurchaseAdditionalEnvronmentsEnabled ? (
|
||||
{isPro() && isPurchaseAdditionalEnvironmentsEnabled ? (
|
||||
<>
|
||||
<PurchasableFeature
|
||||
title='Purchase additional environments'
|
||||
|
@ -247,19 +247,7 @@ exports[`returns all baseRoutes 1`] = `
|
||||
},
|
||||
{
|
||||
"component": [Function],
|
||||
"flag": "EEA",
|
||||
"menu": {
|
||||
"advanced": true,
|
||||
"mobile": true,
|
||||
},
|
||||
"notFlag": "purchaseAdditionalEnvironments",
|
||||
"path": "/environments",
|
||||
"title": "Environments",
|
||||
"type": "protected",
|
||||
},
|
||||
{
|
||||
"component": [Function],
|
||||
"flag": "purchaseAdditionalEnvironments",
|
||||
"enterprise": true,
|
||||
"menu": {
|
||||
"advanced": true,
|
||||
"mobile": true,
|
||||
|
@ -4,7 +4,7 @@ import { StrategiesList } from 'component/strategies/StrategiesList/StrategiesLi
|
||||
import { TagTypeList } from 'component/tags/TagTypeList/TagTypeList';
|
||||
import { IntegrationList } from 'component/integrations/IntegrationList/IntegrationList';
|
||||
import Login from 'component/user/Login/Login';
|
||||
import { EEA, P } from 'component/common/flags';
|
||||
import { P } from 'component/common/flags';
|
||||
import { NewUser } from 'component/user/NewUser/NewUser';
|
||||
import ResetPassword from 'component/user/ResetPassword/ResetPassword';
|
||||
import ForgottenPassword from 'component/user/ForgottenPassword/ForgottenPassword';
|
||||
@ -266,17 +266,8 @@ export const routes: IRoute[] = [
|
||||
title: 'Environments',
|
||||
component: EnvironmentTable,
|
||||
type: 'protected',
|
||||
flag: EEA,
|
||||
notFlag: 'purchaseAdditionalEnvironments',
|
||||
menu: { mobile: true, advanced: true },
|
||||
},
|
||||
{
|
||||
path: '/environments',
|
||||
title: 'Environments',
|
||||
component: EnvironmentTable,
|
||||
type: 'protected',
|
||||
flag: 'purchaseAdditionalEnvironments',
|
||||
menu: { mobile: true, advanced: true },
|
||||
enterprise: true,
|
||||
},
|
||||
{
|
||||
path: '/feedback',
|
||||
|
Loading…
Reference in New Issue
Block a user