mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-24 17:51:14 +02:00
Don't render anything if the flag isn't on
This commit is contained in:
parent
61a90a0950
commit
2ff56be7af
@ -17,6 +17,7 @@ import { AvatarCell } from 'component/changeRequest/ProjectChangeRequests/Change
|
||||
import { HighlightCell } from 'component/common/Table/cells/HighlightCell/HighlightCell';
|
||||
import { GlobalChangeRequestTitleCell } from './GlobalChangeRequestTitleCell.js';
|
||||
import { FeaturesCell } from '../ProjectChangeRequests/ChangeRequestsTabs/FeaturesCell.js';
|
||||
import { useUiFlag } from 'hooks/useUiFlag.js';
|
||||
|
||||
// Mock data with varied projects and change requests
|
||||
const mockChangeRequests = [
|
||||
@ -143,7 +144,7 @@ const mockChangeRequests = [
|
||||
},
|
||||
];
|
||||
|
||||
export const ChangeRequests = () => {
|
||||
const ChangeRequestsInner = () => {
|
||||
const loading = false;
|
||||
const columns = useMemo(
|
||||
() => [
|
||||
@ -277,3 +278,15 @@ export const ChangeRequests = () => {
|
||||
</PageContent>
|
||||
);
|
||||
};
|
||||
|
||||
export const ChangeRequests = () => {
|
||||
if (!useUiFlag('globalChangeRequestList')) {
|
||||
return (
|
||||
<PageContent header={<PageHeader title='Change requests' />}>
|
||||
<p>Nothing to see here. Move along.</p>
|
||||
</PageContent>
|
||||
);
|
||||
}
|
||||
|
||||
return <ChangeRequestsInner />;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user