Skip to content

Commit

Permalink
chore: only rendering profile hyperlink if one exists (#13780)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitch-Henson authored Apr 23, 2024
1 parent ebd5f62 commit 445801a
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ export const ArtworkSidebarPrivateArtwork: React.FC<ArtworkSidebarPrivateArtwork
partner {
name
slug
profile {
isPubliclyVisible
}
}
visibilityLevel
additionalInformation
Expand All @@ -49,22 +52,26 @@ export const ArtworkSidebarPrivateArtwork: React.FC<ArtworkSidebarPrivateArtwork
>
<Text variant="sm">
<b>Exclusive access.</b> This work was privately shared by{" "}
<RouterLink
to={`/partner/${data.partner?.slug}`}
onClick={() => {
const payload = {
action: "Click",
context_module: "Sidebar",
subject: "Gallery Name",
type: "Link",
flow: "Exclusive Access",
}
{data.partner?.profile?.isPubliclyVisible ? (
<RouterLink
to={`/partner/${data.partner?.slug}`}
onClick={() => {
const payload = {
action: "Click",
context_module: "Sidebar",
subject: "Gallery Name",
type: "Link",
flow: "Exclusive Access",
}

trackEvent(payload)
}}
>
{data.partner?.name}
</RouterLink>
trackEvent(payload)
}}
>
{data.partner?.name}
</RouterLink>
) : (
data.partner?.name
)}
</Text>
</Box>
)
Expand Down
13 changes: 10 additions & 3 deletions src/__generated__/ArtworkAppTestQuery.graphql.ts

Large diffs are not rendered by default.

25 changes: 22 additions & 3 deletions src/__generated__/ArtworkSidebarPrivateArtworkQuery.graphql.ts

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

25 changes: 23 additions & 2 deletions src/__generated__/ArtworkSidebarPrivateArtwork_artwork.graphql.ts

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

16 changes: 12 additions & 4 deletions src/__generated__/ArtworkSidebar_Test_Query.graphql.ts

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

Loading

0 comments on commit 445801a

Please sign in to comment.