Skip to content

Commit

Permalink
fix(CrowdfundingRedesign): flag to display banner (#10538)
Browse files Browse the repository at this point in the history
  • Loading branch information
Betree authored Jul 11, 2024
1 parent f917b5b commit 7ad30d6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pages/collective-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { withRouter } from 'next/router';
import { createGlobalStyle } from 'styled-components';

import { getCollectivePageMetadata } from '../lib/collective';
import { OPENCOLLECTIVE_FOUNDATION_ID } from '../lib/constants/collectives';
import { generateNotFoundError } from '../lib/errors';
import { ssrGraphQLQuery } from '../lib/graphql/with-ssr-query';
import { getRequestIntl } from '../lib/i18n/request';
Expand Down Expand Up @@ -163,8 +164,9 @@ class CollectivePage extends React.Component {

const showCrowdfundingPreviewBanner =
!['ORGANIZATION', 'FUND', 'INDIVIDUAL', 'USER'].includes(collective?.type) &&
LoggedInUser?.hasPreviewFeatureEnabled(PREVIEW_FEATURE_KEYS.COLLECTIVE_OVERVIEW) &&
LoggedInUser?.isAdminOfCollective(collective);
LoggedInUser?.hasPreviewFeatureEnabled(PREVIEW_FEATURE_KEYS.CROWDFUNDING_REDESIGN) &&
LoggedInUser?.isAdminOfCollective(collective) &&
collective?.host?.id !== OPENCOLLECTIVE_FOUNDATION_ID;

return (
<Page
Expand Down

0 comments on commit 7ad30d6

Please sign in to comment.