Skip to content

Commit

Permalink
Merge branch 'main' of github.com:TrustlessComputer/bvm-website
Browse files Browse the repository at this point in the history
  • Loading branch information
sett committed Jan 17, 2024
2 parents 234e5a7 + e143509 commit 4fd81c3
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 29 deletions.
File renamed without changes.
8 changes: 4 additions & 4 deletions src/layouts/Header/menuConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export const NAV_ITEMS: Array<NavItem> = [
isHide: false,
},
{
label: 'Modules',
href: '/building-blocks',
label: 'Module Store',
href: '/module-store',
isNewWindow: false,
isHide: false,
},
Expand Down Expand Up @@ -78,8 +78,8 @@ export const NAV_ITEMS_LEFT: Array<NavItem> = [
isHide: false,
},
{
label: 'Modules',
href: '/building-blocks',
label: 'Module Store',
href: '/module-store',
isNewWindow: false,
isHide: false,
},
Expand Down
54 changes: 31 additions & 23 deletions src/modules/Whitelist/HistoryMessage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,43 @@ import useFormatAllowBTC from '@/modules/Whitelist/HistoryMessage/useFormatAllow
const HistoryMessage = () => {
const { loaded, status, isProcessing, amount } = useFormatAllowBTC()

if (!loaded || !status.length) return <></>;
console.log('SANG TEST: ', { loaded, status, isProcessing, amount });
const renderContent = React.useCallback(() => {
if (!loaded || !status.length) return <></>;
if (isProcessing) {
return (
<Flex className={styles.container}>
<Loading />
<p>Wallet verification in progress!</p>
<p>You're in the queue. Please give us a few minutes to process.</p>
<p>Thanks for your patience!</p>
</Flex>
)
}

if (isProcessing) {
return (
<Flex className={styles.container}>
<Loading />
<p>Wallet verification in progress!</p>
<p>You're in the queue. Please give us a few minutes to process.</p>
<p>Thanks for your patience!</p>
<Flex className={cs(styles.container, {
[styles.container__congrats as string]: !!amount.txsCount
})}>
{amount.txsCount ? (
<Flex flexDirection="column" w="100%" alignItems="center">
<p>You've spent <span>{formatCurrency(amount.fee, 0)} BTC</span> for gas fees across <span>{formatCurrency(amount.txsCount, 0)} transactions</span></p>
<p>Congratulations, you've earned <span>{formatCurrency(amount.point, 0)} points</span></p>
<Button onClick={() => shareTwitterSignature({ fee: amount.fee, point: amount.point, txsCount: amount.txsCount })}>Share now</Button>
</Flex>
) : (
<p>
No transactions found. Please connect another wallet and try again.
</p>
)}
</Flex>
)
}
}, [loaded, status, isProcessing, amount]);

return (
<Flex className={cs(styles.container, {
[styles.container__congrats as string]: !!amount.txsCount
})}>
{amount.txsCount ? (
<Flex flexDirection="column" w="100%" alignItems="center">
<p>You've spent <span>{formatCurrency(amount.fee, 0)} BTC</span> for gas fees across <span>{formatCurrency(amount.txsCount, 0)} transactions</span></p>
<p>Congratulations, you've earned <span>{formatCurrency(amount.point, 0)} points</span></p>
<Button onClick={() => shareTwitterSignature({ fee: amount.fee, point: amount.point, txsCount: amount.txsCount })}>Share now</Button>
</Flex>
) : (
<p>
No transactions found. Please connect another wallet and try again.
</p>
)}
</Flex>
<>
{renderContent()}
</>
)
}

Expand Down
5 changes: 3 additions & 2 deletions src/modules/building-blocks/Section_1/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const Section1 = () => {
textAlign={['center', 'left']}
color={'#000'}
>
Building Blocks
Module Store
</Text>
<Box boxSize={['20px', null]} />
<Text
Expand All @@ -23,7 +23,8 @@ const Section1 = () => {
wordBreak={'break-word'}
color={'#000'}
>
Find the best-of-breed blockchain modules for your Bitcoin L2 blockchain.
Find the best-of-breed blockchain modules for your Bitcoin L2
blockchain.
</Text>
</Flex>
);
Expand Down

0 comments on commit 4fd81c3

Please sign in to comment.