mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-04 00:18:01 +01:00
chore: remove project segments gate for oss users (#8666)
This change opens up the project segments page to OSS users. They could navigate to it explicitly before, but would be told it was a premium feature (which it is not (since 5.5)). After this, it'll show up in the settings sidebar as for pro/enterprise, and you'll get the actual segments table instead of "this is a premium feature" message. ![image](https://github.com/user-attachments/assets/1fb0213a-4541-4f01-8f61-48725f4602e1)
This commit is contained in:
parent
76bf6dbcb8
commit
7c28d247d8
@ -1,10 +1,6 @@
|
||||
import { PageContent } from 'component/common/PageContent/PageContent';
|
||||
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
|
||||
import { PageHeader } from 'component/common/PageHeader/PageHeader';
|
||||
import { useRequiredPathParam } from 'hooks/useRequiredPathParam';
|
||||
import { usePageTitle } from 'hooks/usePageTitle';
|
||||
import { SegmentTable } from 'component/segments/SegmentTable/SegmentTable';
|
||||
import { PremiumFeature } from 'component/common/PremiumFeature/PremiumFeature';
|
||||
import { Route, Routes, useNavigate } from 'react-router-dom';
|
||||
import { CreateSegment } from 'component/segments/CreateSegment/CreateSegment';
|
||||
import { EditSegment } from 'component/segments/EditSegment/EditSegment';
|
||||
@ -15,22 +11,10 @@ import { useProjectOverviewNameOrId } from 'hooks/api/getters/useProjectOverview
|
||||
export const ProjectSegments = () => {
|
||||
const projectId = useRequiredPathParam('projectId');
|
||||
const projectName = useProjectOverviewNameOrId(projectId);
|
||||
const { isOss } = useUiConfig();
|
||||
const navigate = useNavigate();
|
||||
|
||||
usePageTitle(`Project segments – ${projectName}`);
|
||||
|
||||
if (isOss()) {
|
||||
return (
|
||||
<PageContent
|
||||
header={<PageHeader titleElement='Segments' />}
|
||||
sx={{ justifyContent: 'center' }}
|
||||
>
|
||||
<PremiumFeature feature='segments' />
|
||||
</PageContent>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Routes>
|
||||
<Route
|
||||
|
@ -53,10 +53,10 @@ export const ProjectSettings = () => {
|
||||
id: 'api-access',
|
||||
label: 'API access',
|
||||
},
|
||||
...paidTabs({
|
||||
{
|
||||
id: 'segments',
|
||||
label: 'Segments',
|
||||
}),
|
||||
},
|
||||
{
|
||||
id: 'environments',
|
||||
label: 'Environments',
|
||||
|
Loading…
Reference in New Issue
Block a user