diff --git a/apps/mobile/src/components/ClaimMintUpsellBanner.tsx b/apps/mobile/src/components/ClaimMintUpsellBanner.tsx
new file mode 100644
index 0000000000..6a2e980680
--- /dev/null
+++ b/apps/mobile/src/components/ClaimMintUpsellBanner.tsx
@@ -0,0 +1,116 @@
+import AsyncStorage from '@react-native-async-storage/async-storage';
+import { useCallback, useEffect, useState } from 'react';
+import { View } from 'react-native';
+import { graphql, useFragment } from 'react-relay';
+import { MCHX_CLAIM_CODE_KEY } from 'src/constants/storageKeys';
+import usePersistedState from 'src/hooks/usePersistedState';
+import { XMarkIcon } from 'src/icons/XMarkIcon';
+
+import { useBottomSheetModalActions } from '~/contexts/BottomSheetModalContext';
+import { ClaimMintUpsellBannerFragment$key } from '~/generated/ClaimMintUpsellBannerFragment.graphql';
+import { contexts } from '~/shared/analytics/constants';
+import colors from '~/shared/theme/colors';
+
+import { Button } from './Button';
+import { GalleryTouchableOpacity } from './GalleryTouchableOpacity';
+import MintCampaignBottomSheet from './Mint/MintCampaign/MintCampaignBottomSheet';
+import { Typography } from './Typography';
+
+type Props = {
+ queryRef: ClaimMintUpsellBannerFragment$key;
+};
+
+export function ClaimMintUpsellBanner({ queryRef }: Props) {
+ const query = useFragment(
+ graphql`
+ fragment ClaimMintUpsellBannerFragment on Query {
+ viewer {
+ ... on Viewer {
+ user {
+ __typename
+ }
+ }
+ }
+ }
+ `,
+ queryRef
+ );
+
+
+ const { showBottomSheetModal, hideBottomSheetModal } = useBottomSheetModalActions();
+
+ const [claimCode] = usePersistedState(MCHX_CLAIM_CODE_KEY, '');
+
+
+ const [isUpsellMintBannerDismissed, setIsUpsellMintBannerDismissed] = useState(false);
+
+ useEffect(() => {
+ AsyncStorage.getItem('isUpsellMintBannerDismissed').then((value) => {
+ if (value === 'true') {
+ setIsUpsellMintBannerDismissed(true);
+ }
+ });
+ }, []);
+
+
+ const handleDismissUpsellBanner = useCallback(() => {
+ setIsUpsellMintBannerDismissed(true);
+ AsyncStorage.setItem('isUpsellMintBannerDismissed', 'true');
+ }, []);
+
+ const handleClaimPress = useCallback(() => {
+ showBottomSheetModal({ content: });
+ }, [hideBottomSheetModal, showBottomSheetModal])
+
+ const user = query.viewer?.user;
+
+
+ if (!user || claimCode || isUpsellMintBannerDismissed) {
+ return (
+
+ );
+ }
+
+ return (
+
+
+
+ Exclusive free mint !
+
+
+ Claim your free generative work by MCHX
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/apps/mobile/src/components/Feed/Posts/PostListMintButtonSection.tsx b/apps/mobile/src/components/Feed/Posts/PostListMintButtonSection.tsx
index 17b326ce4f..9388bdadc9 100644
--- a/apps/mobile/src/components/Feed/Posts/PostListMintButtonSection.tsx
+++ b/apps/mobile/src/components/Feed/Posts/PostListMintButtonSection.tsx
@@ -1,5 +1,7 @@
+import { useMemo } from 'react';
import { View } from 'react-native';
import { graphql, useFragment } from 'react-relay';
+import { extractRelevantMetadataFromToken } from 'shared/utils/extractRelevantMetadataFromToken';
import { MintLinkButton } from '~/components/MintLinkButton';
import { PostListMintButtonSectionFragment$key } from '~/generated/PostListMintButtonSectionFragment.graphql';
@@ -15,6 +17,7 @@ export function PostListMintButtonSection({ postRef }: Props) {
fragment PostListMintButtonSectionFragment on Post {
tokens {
...MintLinkButtonFragment
+ ...extractRelevantMetadataFromTokenFragment
}
author {
primaryWallet {
@@ -35,9 +38,24 @@ export function PostListMintButtonSection({ postRef }: Props) {
const userAddedMintURL = post?.userAddedMintURL ?? '';
+ const { contractAddress } = useMemo(() => {
+ if (token) {
+ return extractRelevantMetadataFromToken(token);
+ }
+ return {
+ contractAddress: '',
+ chain: '',
+ mintUrl: '',
+ };
+ }, [token]);
+
+ const isRadiance = useMemo(() => {
+ return contractAddress === '0x78b92e9afd56b033ead2103f07aced5fac8c0854';
+ }, [contractAddress]);
+
return (
- {token && userAddedMintURL && (
+ {(isRadiance || userAddedMintURL) && token && (
{
+ return contractAddress === '0x78b92e9afd56b033ead2103f07aced5fac8c0854';
+ }, [contractAddress]);
+
+
const { url: mintURL, provider: mintProviderType } = getMintUrlWithReferrer(
overrideMintUrl || mintUrl,
referrerAddress ?? ''
);
+ const { showBottomSheetModal, hideBottomSheetModal } = useBottomSheetModalActions();
+
+ const [claimCode] = usePersistedState(MCHX_CLAIM_CODE_KEY, '');
+
const mintProvider: {
buttonText: string;
icon: React.ReactNode;
@@ -113,23 +126,35 @@ export function MintLinkButton({
icon: ,
};
} else if (mintProviderType === 'Highlight') {
- return {
- buttonText: 'mint on highlight',
- icon: ,
- };
+ if (isRadiance && !claimCode) {
+ return {
+ buttonText: 'mint on gallery',
+ icon: ,
+ };
+ } else {
+ return {
+ buttonText: 'mint on highlight',
+ icon: ,
+ };
+ }
} else if (mintProviderType === 'Foundation') {
return {
buttonText: 'mint on foundation',
icon: ,
};
+
} else {
return null;
}
- }, [mintProviderType, size]);
+ }, [claimCode, isRadiance, mintProviderType, size]);
const handlePress = useCallback(() => {
- Linking.openURL(mintURL);
- }, [mintURL]);
+ if (isRadiance) {
+ showBottomSheetModal({ content: });
+ } else {
+ Linking.openURL(mintURL);
+ }
+ }, [hideBottomSheetModal, isRadiance, mintURL, showBottomSheetModal]);
const arrowColor = useMemo(() => {
const colorMap = {
diff --git a/apps/mobile/src/components/Notification/NotificationSkeleton.tsx b/apps/mobile/src/components/Notification/NotificationSkeleton.tsx
index d7d52e05d5..7cc4928f2b 100644
--- a/apps/mobile/src/components/Notification/NotificationSkeleton.tsx
+++ b/apps/mobile/src/components/Notification/NotificationSkeleton.tsx
@@ -258,10 +258,13 @@ export function NotificationSkeleton({
[notification.followers?.edges, notification.user]
);
+ // TODO Get data from backend
+ const isPinned = true
+
return (
}>
+
diff --git a/schema.graphql b/schema.graphql
index 1cd41b8f52..0130bea5f7 100644
--- a/schema.graphql
+++ b/schema.graphql
@@ -2835,6 +2835,7 @@ enum UserExperienceType {
PostsBetaAnnouncement
CreatorBetaFullscreenAnnouncementModal
CreatorBetaMicroAnnouncementModal
+ RadianceMintApr2024
}
type UserFollowedUsersFeedEventData implements FeedEventData {