mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-31 13:47:02 +02:00
fix: isPro check on change request configuration (#2610)
https://linear.app/unleash/issue/2-487/bug-change-request-badge-is-not-working-on-pro Using the new `isPro()` from `useUiConfig()` seems to fix this in Pro, correctly showing the premium feature info:  The errors described in the issue should be fixed by the new `useEnterpriseSWR`. See: https://unleash-internal.slack.com/archives/C046LV6HH6W/p1670337216187539?thread_ts=1670331887.521059&cid=C046LV6HH6W
This commit is contained in:
parent
9accbcfa8b
commit
990b708632
@ -23,14 +23,11 @@ export const ChangeRequestConfiguration = () => {
|
|||||||
const projectId = useRequiredPathParam('projectId');
|
const projectId = useRequiredPathParam('projectId');
|
||||||
const projectName = useProjectNameOrId(projectId);
|
const projectName = useProjectNameOrId(projectId);
|
||||||
const { hasAccess } = useContext(AccessContext);
|
const { hasAccess } = useContext(AccessContext);
|
||||||
const { isOss, uiConfig } = useUiConfig();
|
const { isOss, isPro } = useUiConfig();
|
||||||
const isPro = !(
|
|
||||||
Boolean(uiConfig.versionInfo?.current.oss) ||
|
|
||||||
Boolean(uiConfig.versionInfo?.current.enterprise)
|
|
||||||
);
|
|
||||||
usePageTitle(`Project change request – ${projectName}`);
|
usePageTitle(`Project change request – ${projectName}`);
|
||||||
|
|
||||||
if (isOss() || isPro) {
|
if (isOss() || isPro()) {
|
||||||
return (
|
return (
|
||||||
<PageContent
|
<PageContent
|
||||||
header={<PageHeader title="Change request configuration" />}
|
header={<PageHeader title="Change request configuration" />}
|
||||||
|
Loading…
Reference in New Issue
Block a user