From c9a9cccec69e00849a10a22603bb58da09e70aca Mon Sep 17 00:00:00 2001 From: "Ng Wing Tat, David" Date: Mon, 25 Mar 2024 11:01:15 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=94=20Add=20Newsletter=20CTA=20&=20Ins?= =?UTF-8?q?tagram=20link=20in=20footer=20(#41)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/social-elements/v2/instagram.png | Bin 0 -> 1876 bytes src/components/footer.tsx | 124 +++--- src/i18n/translations/cn.json | 1 + src/i18n/translations/en.json | 1 + src/i18n/translations/zh.json | 1 + src/templates/basic-v2.tsx | 2 +- src/templates/basic.tsx | 2 +- test/__snapshots__/basic.test.ts.snap | 297 ++++++++------ test/__snapshots__/new-supporter.test.ts.snap | 99 +++-- test/__snapshots__/referral-tx.test.ts.snap | 254 ++++++++++-- .../__snapshots__/reset-password.test.ts.snap | 129 +++++- test/__snapshots__/transaction.test.ts.snap | 129 +++++- .../__snapshots__/civic-liker.test.ts.snap | 369 ++++++++++++++++-- .../__snapshots__/creator.test.ts.snap | 254 ++++++++++-- 14 files changed, 1346 insertions(+), 316 deletions(-) create mode 100644 src/assets/social-elements/v2/instagram.png diff --git a/src/assets/social-elements/v2/instagram.png b/src/assets/social-elements/v2/instagram.png new file mode 100644 index 0000000000000000000000000000000000000000..c4ef80160a96a4a73450822a5247572ef6575d30 GIT binary patch literal 1876 zcmV-a2dnsrP)QfbxZ!;z2=6KvYx<6%|^jL4qx)!?rX;f|k!#&^>xrDfvFA?4Ve|G#mYvvfeD6K?Gk3;9{Nbn)5##3OCh`3I+(CyOZ*Om( zs;a6IbeweedC<9A+F{$L?HK!bJicF7S9dESL?jA0J3C9#!~a8veePBYam5Q zj)Y}cQvfXe^z@V_%SyqcK#rL5y|J-zRaipF3UDc&A;Bl;;S!<@p#M60eSMv^p@@HzNjbOG2r6jVuUEOA{aP4JQUe%*4dW>P{{Q3 zw6o`c7(J?%%>@d;z=o*5$D#iA_O@7BS`r_Dv9U4H)6>KG30xuN?J*Q&0UB6jIKso? zf_ z@$s=>;%|B2q(O@O9o(FcRL2GAilEiq-Th8zunCq#P(3&}C^&a=a#E1`a4l7M1?QRQ z!?2zPOgTpZWc?9R0P7Ck2M7Z!2pR|FZ(IZAVB6i@6>Dp2c^5;l1MPczdmUl%+3S8L zu1NBxX_u>Vh1sKB2j>R50T2QW4-bdZTm_1#<>h59SA+8A=jR0nXrR#VQZbahf+;+p zE4&)OBp@KH3EJaW1%5L=KF-ba+JMU=^TjFkv4z(GtOCoc*xK51{9KLPGCqLjUf>>4 zWgL>dFHV|>L;>Es4ZzCqUHG>jWI6*Yyo$p;z@oXixuXB&#~>Y0;n#;W_(@nsS6A1& z)Dh*p2v`GL{1D~uMZ342h<^^=1raVr;q(W63Rc^vI ztSdl;X@DvhtSdmZT5D^oFont{wApMU=FX{E11#>fx*8L70e_c6UI~LiPaq(>bq2^1 z*NefyLBYk)&``nWDEf_9mV+#?FDygN;R6E$@2nXFT&s=&)O%XOEnI-zO$Y;WxSGN; znT%E%gYdZ43*1Ys3v7Ul{}V1?odJMa&dMPxsO_f+C<*8M+TBq#Ua1t$#ipy$s5=#Ral0MZ6b#Zmx-(ap;k z31X8Ck7AaGz-WOX;BhKQlQ9C;8)EM$0NqjYM@$rG4~K9$?8K?mFZIDf2FnRhr0L>l}zBA~Wz?K-Y0;NW*t&5~*5G5cyHBrBW zU8l8LywaE;g-@kYp*4+GQxr^~0aGW%16Gaj5kQ@gwvvC?-}-fFg&UWfa4D!GzJg0167Xs+tua3($O)DBo!!JW%qBlP()(%3UvD zREL3$Uv6p=&sUHOfe0aOO z?(X(=qq{C5e|;V+GR3d@;WKRsu%lQD9+Q=ruR|WETC8S( { const intl = useIntl(); return ( - - - {shouldShowDivider && ( - - )} - + + + {shouldShowDivider && ( + )} - href="https://twitter.com/likecoin" - /> - - {socialElements.map(({ key, href, assetPath }) => ( - - {null} - - ))} - - - - - - - - - + + + + + + + + + + {socialElements.map(({ key, href, assetPath }) => ( + + {null} + + ))} + + + + + + + + + + ); }; diff --git a/src/i18n/translations/cn.json b/src/i18n/translations/cn.json index 238a3ab..db0197f 100644 --- a/src/i18n/translations/cn.json +++ b/src/i18n/translations/cn.json @@ -4,6 +4,7 @@ "cta.sponsor-link.hint": "用这条链结建立你的粉丝团。详情", "cta.writing-nft.title": "立即收藏以表支持", "download": "下载:", + "footer_newsletter_button": "订阅电子报", "greeting": "你好 {name}:", "header.manage-delegation": "管理委託", "help.center.text": "帮助中心", diff --git a/src/i18n/translations/en.json b/src/i18n/translations/en.json index b3e6683..18d8b94 100644 --- a/src/i18n/translations/en.json +++ b/src/i18n/translations/en.json @@ -4,6 +4,7 @@ "cta.sponsor-link.hint": "Build your fans group by this link. Learn more", "cta.writing-nft.title": "Collect to support now", "download": "Download:", + "footer_newsletter_button": "Subscribe Newsletter", "greeting": "Dear {name}", "header.manage-delegation": "Manage delegation", "help.center.text": "Help Center", diff --git a/src/i18n/translations/zh.json b/src/i18n/translations/zh.json index 3a73b81..631e9e2 100644 --- a/src/i18n/translations/zh.json +++ b/src/i18n/translations/zh.json @@ -4,6 +4,7 @@ "cta.sponsor-link.hint": "用這條鏈結建立你的粉絲團。詳情", "cta.writing-nft.title": "立即收藏以表支持", "download": "下載:", + "footer_newsletter_button": "訂閱電子報", "greeting": "你好 {name}:", "header.manage-delegation": "管理委託", "help.center.text": "幫助中心", diff --git a/src/templates/basic-v2.tsx b/src/templates/basic-v2.tsx index 51b14ea..8f40653 100644 --- a/src/templates/basic-v2.tsx +++ b/src/templates/basic-v2.tsx @@ -32,7 +32,7 @@ export const BasicV2Template = ({ subtitle, subtitlePrepend, content, - cta = 'writing-nft', + cta = '', unsubscribeLink, language, }: BasicV2TemplateProps) => { diff --git a/src/templates/basic.tsx b/src/templates/basic.tsx index 3a0205a..f5d7b0f 100644 --- a/src/templates/basic.tsx +++ b/src/templates/basic.tsx @@ -33,7 +33,7 @@ export const BasicTemplate = ({ subtitle, subtitlePrepend, content, - cta = 'writing-nft', + cta = '', unsubscribeLink, language, }: BasicTemplateProps) => { diff --git a/test/__snapshots__/basic.test.ts.snap b/test/__snapshots__/basic.test.ts.snap index 26bfb70..1ed6087 100644 --- a/test/__snapshots__/basic.test.ts.snap +++ b/test/__snapshots__/basic.test.ts.snap @@ -406,9 +406,9 @@ exports[`Render basic templates Default 1`] = ` - +
-
立即收藏以表支持
+

+

+ + + - @@ -497,7 +498,7 @@ exports[`Render basic templates Default 1`] = ` - - - -
- - - - \\"立即收藏以表支持\\" - - - + + + 訂閱電子報 +
@@ -517,23 +518,6 @@ exports[`Render basic templates Default 1`] = ` >
- -

-

- - - - -
- + @@ -617,7 +601,7 @@ exports[`Render basic templates Default 1`] = `
- + @@ -648,7 +632,7 @@ exports[`Render basic templates Default 1`] = `
- + @@ -659,6 +643,37 @@ exports[`Render basic templates Default 1`] = `
+ + + + + + + + + + + @@ -1104,9 +1119,9 @@ exports[`Render basic templates With avatar (Civic Liker) 1`] = ` + + + +
+ + + + + + +
+ + + +
+
- +
-
立即收藏以表支持
+

+

+ + +
- @@ -1195,7 +1211,7 @@ exports[`Render basic templates With avatar (Civic Liker) 1`] = ` - - - -
- - - - \\"立即收藏以表支持\\" - - - + + + 訂閱電子報 +
@@ -1215,23 +1231,6 @@ exports[`Render basic templates With avatar (Civic Liker) 1`] = ` >
- -

-

- - - - -
- + @@ -1315,7 +1314,7 @@ exports[`Render basic templates With avatar (Civic Liker) 1`] = `
- + @@ -1346,7 +1345,7 @@ exports[`Render basic templates With avatar (Civic Liker) 1`] = `
- + @@ -1357,6 +1356,37 @@ exports[`Render basic templates With avatar (Civic Liker) 1`] = `
+ + + + + + + @@ -1802,9 +1832,9 @@ exports[`Render basic templates With avatar 1`] = ` + + + +
+ + + + + + +
+ + + +
+
- +
-
立即收藏以表支持
+

+

+ + +
- @@ -1893,7 +1924,7 @@ exports[`Render basic templates With avatar 1`] = ` - - - -
- - - - \\"立即收藏以表支持\\" - - - + + + 訂閱電子報 +
@@ -1913,23 +1944,6 @@ exports[`Render basic templates With avatar 1`] = ` >
- -

-

- - - - -
- + @@ -2013,7 +2027,7 @@ exports[`Render basic templates With avatar 1`] = `
- + @@ -2044,7 +2058,7 @@ exports[`Render basic templates With avatar 1`] = `
- + @@ -2055,6 +2069,37 @@ 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 be01168..850e119 100644 --- a/test/__snapshots__/new-supporter.test.ts.snap +++ b/test/__snapshots__/new-supporter.test.ts.snap @@ -406,9 +406,9 @@ exports[`Render new supporter templates Default 1`] = ` + + + +
+ + + + + + +
+ + + +
+
- +
-
立即收藏以表支持
+

+

+ + +
- @@ -497,7 +498,7 @@ exports[`Render new supporter templates Default 1`] = ` - - - -
- - - - \\"立即收藏以表支持\\" - - - + + + 訂閱電子報 +
@@ -517,23 +518,6 @@ exports[`Render new supporter templates Default 1`] = ` >
- -

-

- - - - -
- + @@ -617,7 +601,7 @@ exports[`Render new supporter templates Default 1`] = `
- + @@ -648,7 +632,7 @@ exports[`Render new supporter templates Default 1`] = `
- + @@ -659,6 +643,37 @@ exports[`Render new supporter templates Default 1`] = `
+ + + + + + + diff --git a/test/__snapshots__/referral-tx.test.ts.snap b/test/__snapshots__/referral-tx.test.ts.snap index 21e297b..bc6d742 100644 --- a/test/__snapshots__/referral-tx.test.ts.snap +++ b/test/__snapshots__/referral-tx.test.ts.snap @@ -508,18 +508,17 @@ exports[`Render referral tx templates Referee 1`] = ` - - - + +
- +
+ + + + + + +
+ + + +
+
+ + + + + +
@@ -541,7 +540,7 @@ exports[`Render referral tx templates Referee 1`] = `

+ + + + + + + +
+ + 訂閱電子報 + +
+ +
+ + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + +
+ + +
+ + + + + + + + +
+ + + +
- + @@ -639,7 +713,7 @@ exports[`Render referral tx templates Referee 1`] = `
- + @@ -670,7 +744,7 @@ exports[`Render referral tx templates Referee 1`] = `
- + @@ -681,6 +755,37 @@ exports[`Render referral tx templates Referee 1`] = `
+ + + + + + + @@ -1252,18 +1357,17 @@ exports[`Render referral tx templates Referrer 1`] = ` - - - + +
- +
+ + + + + + +
+ + + +
+
+ + + + + +
@@ -1285,7 +1389,7 @@ exports[`Render referral tx templates Referrer 1`] = `

+ + + + + + + +
+ + 訂閱電子報 + +
+ +
+ +
+ +
+ + + + + + + + + + + + +
+ + + + + + + +
+ + +
+ + + + + + + + +
+ + + +
- + @@ -1383,7 +1562,7 @@ exports[`Render referral tx templates Referrer 1`] = `
- + @@ -1414,7 +1593,7 @@ exports[`Render referral tx templates Referrer 1`] = `
- + @@ -1425,6 +1604,37 @@ exports[`Render referral tx templates Referrer 1`] = `
+ + + + + + + diff --git a/test/__snapshots__/reset-password.test.ts.snap b/test/__snapshots__/reset-password.test.ts.snap index adb3560..16c6c84 100644 --- a/test/__snapshots__/reset-password.test.ts.snap +++ b/test/__snapshots__/reset-password.test.ts.snap @@ -614,18 +614,17 @@ exports[`Render new reset-password templates Default 1`] = ` - - - -
- + + +
+
+ + + + + + +
+ + + +
+
+ + + + + +
@@ -647,7 +646,7 @@ exports[`Render new reset-password templates Default 1`] = `

+ + + + + + + +
+ + Subscribe Newsletter + +
+ +
+ +
+ +
+ + + + + + + + + + + + +
+ + + + + + + +
+ + +
+ + + + + + + + +
+ + + +
- + @@ -745,7 +819,7 @@ exports[`Render new reset-password templates Default 1`] = `
- + @@ -776,7 +850,7 @@ exports[`Render new reset-password templates Default 1`] = `
- + @@ -787,6 +861,37 @@ exports[`Render new reset-password templates Default 1`] = `
+ + + + + + + diff --git a/test/__snapshots__/transaction.test.ts.snap b/test/__snapshots__/transaction.test.ts.snap index 6d08a33..cefb92c 100644 --- a/test/__snapshots__/transaction.test.ts.snap +++ b/test/__snapshots__/transaction.test.ts.snap @@ -600,18 +600,17 @@ exports[`Render new transaction templates Default 1`] = ` - - - -
- + + +
+
+ + + + + + +
+ + + +
+
+ + + + + +
@@ -633,7 +632,7 @@ exports[`Render new transaction templates Default 1`] = `

+ + + + + + + +
+ + Subscribe Newsletter + +
+ +
+ +
+ +
+ + + + + + + + + + + + +
+ + + + + + + +
+ + +
+ + + + + + + + +
+ + + +
- + @@ -731,7 +805,7 @@ exports[`Render new transaction templates Default 1`] = `
- + @@ -762,7 +836,7 @@ exports[`Render new transaction templates Default 1`] = `
- + @@ -773,6 +847,37 @@ exports[`Render new transaction templates Default 1`] = `
+ + + + + + + diff --git a/test/reports/monthly/__snapshots__/civic-liker.test.ts.snap b/test/reports/monthly/__snapshots__/civic-liker.test.ts.snap index 022f8c3..4b42418 100644 --- a/test/reports/monthly/__snapshots__/civic-liker.test.ts.snap +++ b/test/reports/monthly/__snapshots__/civic-liker.test.ts.snap @@ -838,18 +838,17 @@ exports[`Render Civic Liker monthly report templates V1 1`] = ` - - - + +
- +
+ + + + + + +
+ + + +
+
+ + + + + +
@@ -871,7 +870,7 @@ exports[`Render Civic Liker monthly report templates V1 1`] = `

+ + + + + + + +
+ + 訂閱電子報 + +
+ +
+ +
+ +
+ + + + + + + + + + + + +
+ + + + + + + +
+ + +
+ + + + + + + + +
+ + + +
- + @@ -969,7 +1043,7 @@ exports[`Render Civic Liker monthly report templates V1 1`] = `
- + @@ -1000,7 +1074,7 @@ exports[`Render Civic Liker monthly report templates V1 1`] = `
- + @@ -1011,6 +1085,37 @@ exports[`Render Civic Liker monthly report templates V1 1`] = `
+ + + + + + + @@ -1988,18 +2093,17 @@ exports[`Render Civic Liker monthly report templates V2 1`] = ` - - - + +
- +
+ + + + + + +
+ + + +
+
+ + + + + +
@@ -2021,7 +2125,7 @@ exports[`Render Civic Liker monthly report templates V2 1`] = `

+ + + + + + + +
+ + 訂閱電子報 + +
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ + +
+ + + + + + + +
+ + + + + + + + + +
+ + + + + + + +
+ + 訂閱電子報 + +
+ +
+ +
+
@@ -3401,7 +3685,7 @@ exports[`Render Civic Liker monthly report templates V3 1`] = `
@@ -3434,7 +3718,7 @@ exports[`Render Civic Liker monthly report templates V3 1`] = `
- + @@ -3504,7 +3788,7 @@ exports[`Render Civic Liker monthly report templates V3 1`] = `
- + @@ -3535,7 +3819,7 @@ exports[`Render Civic Liker monthly report templates V3 1`] = `
- + @@ -3546,6 +3830,37 @@ exports[`Render Civic Liker monthly report templates V3 1`] = `
+ + + + + + + + + + + diff --git a/test/reports/monthly/__snapshots__/creator.test.ts.snap b/test/reports/monthly/__snapshots__/creator.test.ts.snap index 7c929d4..e048006 100644 --- a/test/reports/monthly/__snapshots__/creator.test.ts.snap +++ b/test/reports/monthly/__snapshots__/creator.test.ts.snap @@ -1127,18 +1127,17 @@ exports[`Render writer monthly report templates Default 1`] = ` - - - + +
- +
+ + + + + + +
+ + + +
+
+ + + + + +
@@ -1160,7 +1159,7 @@ exports[`Render writer monthly report templates Default 1`] = `

+ + + + + + + +
+ + 訂閱電子報 + +
+ +
+ + + + + + +
+ + + + + + +
+ + + + + +
+ + + + + + + +
+ + +
+ + + + + + + + +
+ + + +
- + @@ -1258,7 +1332,7 @@ exports[`Render writer monthly report templates Default 1`] = `
- + @@ -1289,7 +1363,7 @@ exports[`Render writer monthly report templates Default 1`] = `
- + @@ -1300,6 +1374,37 @@ exports[`Render writer monthly report templates Default 1`] = `
+ + + + + + + @@ -2723,18 +2828,17 @@ exports[`Render writer monthly report templates V2 1`] = ` - - - + +
- +
+ + + + + + +
+ + + +
+
+ + + + + +
@@ -2756,7 +2860,7 @@ exports[`Render writer monthly report templates V2 1`] = `

+ + + + + + + +
+ + 訂閱電子報 + +
+ +
+ +
+ +
+ + + + + + + + + + + + +