Skip to content

Commit

Permalink
special copy for mchx notification on web (#2404)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaitoo1 authored Apr 5, 2024
1 parent fbd84d2 commit f4d9d4f
Showing 1 changed file with 34 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { graphql, useFragment } from 'react-relay';
import styled from 'styled-components';

import { Button } from '~/components/core/Button/Button';
import GalleryLink from '~/components/core/GalleryLink/GalleryLink';
import { HStack, VStack } from '~/components/core/Spacer/Stack';
import { BaseM } from '~/components/core/Text/Text';
import { GalleryAnnouncementFragment$key } from '~/generated/GalleryAnnouncementFragment.graphql';
Expand All @@ -24,19 +25,51 @@ export function GalleryAnnouncement({ notificationRef, onClose }: Props) {
ctaText
ctaLink
imageUrl
internalId
}
`,
notificationRef
);

const { title, description, ctaText, ctaLink, imageUrl } = notification;
const { title, description, ctaText, ctaLink, imageUrl, internalId } = notification;

const handleClick = useCallback(() => {
if (!ctaLink) return;
window.open(ctaLink, '_blank');
onClose();
}, [ctaLink, onClose]);

if (internalId === 'apr-2024-mchx-collab') {
return (
<GalleryLink href="https://apps.apple.com/app/gallery/id6447068892">
<StyledNotificationContent align="center" justify="space-between" gap={8}>
<HStack align="center" gap={8}>
<VStack>{imageUrl ? <StyledImage src={imageUrl} /> : <StyledDefaultImage />}</VStack>

<VStack>
<StyledTextWrapper align="center" as="span" wrap="wrap">
<BaseM>
<strong>Gallery is now on the App Store</strong>
</BaseM>
<BaseM as="span">
Download the app today to claim your free mint of Radiance by MCHX.
</BaseM>
</StyledTextWrapper>
</VStack>
</HStack>
<StyledButton
eventElementId="Cta link from gallery announcement"
eventName="Click cta link from gallery announcement"
eventContext={contexts.Notifications}
variant="primary"
onClick={handleClick}
>
Download
</StyledButton>
</StyledNotificationContent>
</GalleryLink>
);
}
return (
<StyledNotificationContent align="center" justify="space-between" gap={8}>
<HStack align="center" gap={8}>
Expand Down

0 comments on commit f4d9d4f

Please sign in to comment.