diff --git a/src/components/cta-writing-nft.tsx b/src/components/cta-writing-nft.tsx
index 36acd14..8afcad3 100644
--- a/src/components/cta-writing-nft.tsx
+++ b/src/components/cta-writing-nft.tsx
@@ -12,16 +12,21 @@ import { BasicSection, BasicSectionProps } from './sections/basic';
export interface WritingNFTCTASectionProps extends BasicSectionProps {
isButton?: boolean;
likerID?: string;
+ url?: string;
}
export const WritingNFTCTASection = ({
isButton = false,
likerID,
+ url: overrideURL,
...props
}: WritingNFTCTASectionProps) => {
const intl = useIntl();
const url = wrapUtm(
- likerID ? `${LIKER_LAND_ROOT}/${likerID}` : `${LIKER_LAND_ROOT}/writing-nft`
+ overrideURL ||
+ (likerID
+ ? `${LIKER_LAND_ROOT}/${likerID}`
+ : `${LIKER_LAND_ROOT}/writing-nft`)
);
if (isButton) {
return (
diff --git a/src/components/nft-widget.tsx b/src/components/nft-widget.tsx
index fd3d2e0..116f5fc 100644
--- a/src/components/nft-widget.tsx
+++ b/src/components/nft-widget.tsx
@@ -96,6 +96,7 @@ export const NFTWidget = ({
width={14}
height={14}
src={getAssetPath('/icons/coin-insert.png')}
+ alt=""
style={{
verticalAlign: 'middle',
marginRight: 8,
diff --git a/src/templates/nft/creator-follow/confirmation.tsx b/src/templates/nft/creator-follow/confirmation.tsx
index 612df50..f932130 100644
--- a/src/templates/nft/creator-follow/confirmation.tsx
+++ b/src/templates/nft/creator-follow/confirmation.tsx
@@ -5,7 +5,6 @@ import { MjmlColumn, MjmlText } from 'mjml-react';
import * as Colors from '../../../constants/colors';
import { Avatar } from '../../../components/avatar';
-import { WritingNFTCTASection } from '../../../components/cta-writing-nft';
import { FooterSection } from '../../../components/footer';
import { HeaderSection } from '../../../components/header';
import { Link } from '../../../components/link';
@@ -61,7 +60,7 @@ export const CreatorFollowConfirmationTemplate = ({
-
+
-
);
diff --git a/src/templates/nft/creator-follow/publish-new.tsx b/src/templates/nft/creator-follow/publish-new.tsx
index 9488727..6cbb520 100644
--- a/src/templates/nft/creator-follow/publish-new.tsx
+++ b/src/templates/nft/creator-follow/publish-new.tsx
@@ -45,6 +45,7 @@ export const CreatorFollowPublishNewTemplate = (
}}
/>
}
+ shouldShowCTA={true}
/>
);
};
diff --git a/src/templates/nft/default.tsx b/src/templates/nft/default.tsx
index 806abe6..6c96e93 100644
--- a/src/templates/nft/default.tsx
+++ b/src/templates/nft/default.tsx
@@ -22,6 +22,7 @@ export interface NFTDefaultTemplateProps extends NFTTemplateProps {
headerText?: React.ReactNode;
message?: string;
body?: React.ReactElement;
+ shouldShowCTA?: boolean;
}
export const NFTDefaultTemplate = ({
@@ -39,6 +40,7 @@ export const NFTDefaultTemplate = ({
nftTitle,
nftCoverImageSrc,
nftURL,
+ shouldShowCTA = false,
}: NFTDefaultTemplateProps) => {
return (
@@ -108,11 +110,14 @@ export const NFTDefaultTemplate = ({
/>
-
+ {shouldShowCTA && (
+
+ )}
);
diff --git a/src/templates/nft/notification/purchase-multiple.tsx b/src/templates/nft/notification/purchase-multiple.tsx
index c2edc85..acf6884 100644
--- a/src/templates/nft/notification/purchase-multiple.tsx
+++ b/src/templates/nft/notification/purchase-multiple.tsx
@@ -6,7 +6,6 @@ import * as Colors from '../../../constants/colors';
import { LIKER_LAND_ROOT } from '../../../constants';
import { Avatar } from '../../../components/avatar';
-import { WritingNFTCTASection } from '../../../components/cta-writing-nft';
import { FooterSection } from '../../../components/footer';
import { HeaderSection } from '../../../components/header';
import { Link } from '../../../components/link';
@@ -211,6 +210,7 @@ export const NFTNotificationPurchaseMultipleTemplate = ({
width={14}
height={14}
src={getAssetPath('/icons/coin-insert.png')}
+ alt=""
style={{
verticalAlign: 'middle',
marginRight: 8,
@@ -225,7 +225,6 @@ export const NFTNotificationPurchaseMultipleTemplate = ({
)}
-
);
diff --git a/test/__snapshots__/basic.test.ts.snap b/test/__snapshots__/basic.test.ts.snap
index 1df791b..26bfb70 100644
--- a/test/__snapshots__/basic.test.ts.snap
+++ b/test/__snapshots__/basic.test.ts.snap
@@ -433,7 +433,7 @@ exports[`Render basic templates Default 1`] = `
立即收集 Wrting NFT
+ >立即收藏以表支持
@@ -451,11 +451,11 @@ exports[`Render basic templates Default 1`] = `
@@ -1131,7 +1131,7 @@ exports[`Render basic templates With avatar (Civic Liker) 1`] = `
立即收集 Wrting NFT
+ >立即收藏以表支持
|
@@ -1149,11 +1149,11 @@ exports[`Render basic templates With avatar (Civic Liker) 1`] = `
@@ -1829,7 +1829,7 @@ exports[`Render basic templates With avatar 1`] = `
立即收集 Wrting NFT
+ >立即收藏以表支持
|
@@ -1847,11 +1847,11 @@ exports[`Render basic templates With avatar 1`] = `
diff --git a/test/__snapshots__/new-supporter.test.ts.snap b/test/__snapshots__/new-supporter.test.ts.snap
index 5463444..be01168 100644
--- a/test/__snapshots__/new-supporter.test.ts.snap
+++ b/test/__snapshots__/new-supporter.test.ts.snap
@@ -433,7 +433,7 @@ exports[`Render new supporter templates Default 1`] = `
立即收集 Wrting NFT
+ >立即收藏以表支持
|
@@ -451,11 +451,11 @@ exports[`Render new supporter templates Default 1`] = `
|