diff --git a/web/src/pages/open-source-heroes/_components/ClaimForm.tsx b/web/src/pages/open-source-heroes/_components/ClaimForm.tsx index 217c9c9c896..7561415aa12 100644 --- a/web/src/pages/open-source-heroes/_components/ClaimForm.tsx +++ b/web/src/pages/open-source-heroes/_components/ClaimForm.tsx @@ -69,7 +69,7 @@ export function ClaimForm () { if (claimedThisSession) { children = ; } else { - children = ; + children = ; } } else if (check.isEligible) { if (tenants.length === 0) { @@ -90,7 +90,7 @@ export function ClaimForm () { // <> // //
- // + // //
// //
@@ -141,16 +141,16 @@ function ClaimedThisSession ({ check }: { check: Check }) { TiDB Cloud to check it out and use it. + Start Building with TiDB Cloud! - ); } -function Claimed () { +function Claimed ({ check }: { check: Check }) { const { user } = useResponsiveAuth0(); return ( @@ -159,17 +159,15 @@ function Claimed () { Hi {user?.nickname ?? user?.name}
- You've already participated in this campaign. -
- Thanks for being an open-source hero. + Thanks for being an open-source hero and claiming {check.credits} in TiDB Serverless credits for your contributions to the open-source community.
- Ready to build something amazing? + We are proud of you! Share this great news with friends and start building something amazing together.
+ Start Building with TiDB Cloud! - ); @@ -184,17 +182,15 @@ function NotEligible ({ tenants }: { tenants: Tenant[] }) { Hi {user?.nickname ?? user?.name}
- Thank you for your contributions to the open-source community. -
- As a token of our appreciation, you have 25GB of free storage and 250 million reads available on TiDB Serverless. + Thanks for being an open-source hero! As a token of our appreciation, you have 25GB of free storage and 250 million reads available on TiDB Serverless.
- Start building your next project today. + Share this great news with your friends and start building something amazing together.
+ Login to TiDB Cloud - ); @@ -325,11 +321,23 @@ function Eligible ({ tenants, check, onClaim }: { tenants: Tenant[], check: Chec ; } -function ShareButton () { +function ShareButton ({ check }: { check?: Check }) { + let title: string; + let url: string; + const hashtags = ['TiDB', 'OpenSource', 'CloudComputing']; + + if (check?.isClaimed) { + title = `I just claimed ${check.credits} in TiDB Serverless credits for my open-source contributions! Proud to be an open-source hero. Curious about your own GitHub contributions? See how many free TiDB Serverless credits you can claim: `; + url = 'https://ossinsight.io/open-source-heroes/?utm_source=twitter&utm_medium=social&utm_campaign=plg_OSScontribution_credit_05'; + } else { + title = 'Excited to share that I received 25GB of free storage and 250 million reads on TiDB Serverless for my open-source contributions! Want to know how many free TiDB Serverless credits your GitHub contributions can earn? Check it out: '; + url = 'https://ossinsight.io/open-source-heroes/?utm_source=twitter&utm_medium=social&utm_campaign=plg_OSScontribution_credit_05'; + } + return ( -