Skip to content

Commit

Permalink
GRO-767: Supporting the Creation of "Women Owned" Gallery Attribute (#…
Browse files Browse the repository at this point in the history
…9771)

* Updated to handle multiple badges in Marquee

* removed unused import

* Updated to handle multiple badges in Marquee

* removed unused import

* Updated via changes from main

* Moved into entityheader
  • Loading branch information
The-Beez-Kneez committed Mar 30, 2022
1 parent 4060689 commit 7a5997d
Show file tree
Hide file tree
Showing 3 changed files with 245 additions and 5 deletions.
15 changes: 11 additions & 4 deletions src/v2/Apps/Partner/PartnerApp.tsx
Expand Up @@ -31,8 +31,15 @@ export const PartnerApp: React.FC<PartnerAppProps> = ({
throw new HttpError(404)
}

const isBlackOwned =
categories!.filter(c => c && c.name === "Black Owned").length > 0
const galleryBadges = ["Black Owned", "Women Owned"]

const eligibleCategories = (categories || []).filter(Boolean)
const categoryNames: string[] = eligibleCategories.map(
category => category?.name || ""
)
const firstEligibleBadgeName: string | undefined = galleryBadges.find(badge =>
categoryNames.includes(badge)
)

return (
<PartnerArtistsLoadingContextProvider>
Expand All @@ -46,8 +53,8 @@ export const PartnerApp: React.FC<PartnerAppProps> = ({
<PartnerHeader partner={partner} />

<FullBleed mb={[2, 4]}>
{isBlackOwned ? (
<Marquee speed="static" marqueeText="Black Owned" />
{firstEligibleBadgeName ? (
<Marquee speed="static" marqueeText={firstEligibleBadgeName} />
) : (
<Separator />
)}
Expand Down
2 changes: 1 addition & 1 deletion src/v2/Components/EntityHeaders/EntityHeaderPartner.tsx
Expand Up @@ -10,7 +10,7 @@ import { extractNodes } from "v2/Utils/extractNodes"
import { EntityHeaderPartner_partner } from "v2/__generated__/EntityHeaderPartner_partner.graphql"
import { FollowProfileButtonFragmentContainer } from "../FollowButton/FollowProfileButton"

const DISPLAYABLE_BADGES = ["black-owned"]
const DISPLAYABLE_BADGES = ["black-owned", "women-owned"]

export interface EntityHeaderPartnerProps extends BoxProps {
partner: EntityHeaderPartner_partner
Expand Down
233 changes: 233 additions & 0 deletions src/v2/__generated__/PartnerCell_partner.graphql.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7a5997d

Please sign in to comment.