Skip to content

Commit

Permalink
update credit format
Browse files Browse the repository at this point in the history
  • Loading branch information
634750802 committed Sep 11, 2024
1 parent 4aaf9ff commit 09eb372
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions web/src/pages/open-source-heroes/_components/ClaimForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ export function ClaimForm () {
headers: {
Authorization: `Bearer ${await getAccessTokenSilently({ connection: 'github' })}`,
},
}).then(res => {
res = { ...res };
res.credits = parseInt(res.credits).toFixed(0);
return res;
}));

const { data: tenants } = useSWR('/api/v1/serverless-credits-campaign/tenants', async url => await giftClientWithoutCache.get<any, Tenant[]>(url, {
Expand Down Expand Up @@ -141,7 +145,7 @@ function ClaimedThisSession ({ check }: { check: Check }) {
title: 'Open Source Heroes, we ❤️ you! To show our appreciation, claim up to $1000 in FREE TiDB Serverless Credits to fuel your next big idea. Build with a powerful, scalable serverless database. \nStart today!',
hashtags: ['opensource', 'database', 'cloud', 'developer', 'tidbserverless'],
})}>
<XIcon round size={32} bgStyle={{ fill: 'white' }} iconFillColor='black' />
<XIcon round size={32} bgStyle={{ fill: 'white' }} iconFillColor="black" />
</IconButton>
</Box>
</>
Expand Down Expand Up @@ -171,7 +175,7 @@ function Claimed () {
title: 'Open Source Heroes, we ❤️ you! To show our appreciation, claim up to $1000 in FREE TiDB Serverless Credits to fuel your next big idea. Build with a powerful, scalable serverless database. \nStart today!',
hashtags: ['opensource', 'database', 'cloud', 'developer', 'tidbserverless'],
})}>
<XIcon round size={32} bgStyle={{ fill: 'white' }} iconFillColor='black' />
<XIcon round size={32} bgStyle={{ fill: 'white' }} iconFillColor="black" />
</IconButton>
</Box>
</>
Expand Down

0 comments on commit 09eb372

Please sign in to comment.