Skip to content

Commit

Permalink
chore: update ui
Browse files Browse the repository at this point in the history
  • Loading branch information
camewell071 committed Jan 31, 2024
1 parent ecedcd6 commit 2b2af58
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 15 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"react-final-form": "^6.5.9",
"react-google-recaptcha-v3": "^1.10.1",
"react-hot-toast": "^2.4.1",
"react-jazzicon": "^1.0.4",
"react-modal-video": "^2.0.1",
"react-player": "^2.14.1",
"react-qr-code": "^2.0.12",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ const NakaCountDown = React.memo(() => {
{!!bestPNL?.winner ? (
<Flex className={styles.item}>
<Text className={styles.item_title}>
Top PNL
Top 1 PNL
</Text>
<Text className={styles.item_name} cursor="pointer" _hover={{ textDecoration: bestPNL?.winner?.twitter_username ? 'underline' : 'unset' }} onClick={() => {
if (!bestPNL?.winner?.twitter_username) return;
window.open(`https://twitter.com/${bestPNL?.winner?.twitter_username}`, '_blank');
}}>
{formatString(bestPNL?.winner?.twitter_name || bestPNL?.winner?.address , 6)} <span>+{formatCurrency(bestPNL?.winner?.realized_pnl || '0', 0, 5, 'TC', false)} BTC</span>
{formatString(bestPNL?.winner?.twitter_name || bestPNL?.winner?.address , 6)} <span>+{formatCurrency(bestPNL?.winner?.realized_pnl || '0', 0, 5)} BTC</span>
</Text>
</Flex>
) : (
Expand All @@ -49,7 +49,7 @@ const NakaCountDown = React.memo(() => {
)}
<Flex className={styles.item}>
<Text className={styles.item_title}>
Rewards
Reward
</Text>
<Flex className={styles.item_reward}>
${bestPNL.reward}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { useAppSelector } from '@/stores/hooks';
import { coinPricesSelector } from '@/stores/states/common/selector';
import { Coin } from '@/stores/states/common/types';
import BigNumber from 'bignumber.js';
import Jazzicon, { jsNumberForAddress } from 'react-jazzicon';

interface IProps extends IBaseModalProps {
}
Expand Down Expand Up @@ -47,6 +48,7 @@ const TradeNakaWinnersPopup = ({ isShow, onHide }: IProps) => {
config,
label: <Text>USER</Text>,
render(row: TopWinner) {
const name = row?.twitter_name || row?.twitter_username;
return (
<Flex
alignItems="center"
Expand All @@ -58,15 +60,20 @@ const TradeNakaWinnersPopup = ({ isShow, onHide }: IProps) => {
}}
maxW="170px"
>
<Avatar
url={getUrlAvatarTwitter(
row?.twitter_avatar as string,
'normal',
)}
address={''}
width={40}
name={row?.twitter_name || row?.twitter_username || row?.address || ''}
/>
{!!name ? (
<Avatar
url={getUrlAvatarTwitter(
row?.twitter_avatar as string,
'normal',
)}
address={''}
width={40}
name={name || ''}
/>
) : (
<Jazzicon diameter={40} seed={jsNumberForAddress(row?.address || "")} />
)}

<Text className={cs(styles.modalContent__userName)}>{row?.twitter_username ? formatName(row?.twitter_username || '-', 17) : (row?.address || '').slice(0, 8)}</Text>
</Flex>
);
Expand Down
7 changes: 4 additions & 3 deletions src/modules/PublicSale/activities/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,16 @@ Good luck and have fun!
link: 'https://nakachain.xyz/app',
},
{
title: 'View winners',
title: 'Winners',
type: 'action',
onPress: () => {
onOpenNakaWinners()
}
},
],
desc: 'Experience on-chain BRC-20 perpetual trading with Naka Chain - the Bitcoin L2 for BRC-20 DeFi powered by BVM' +
'<br/>For the first time, you can go long and short on BRC-20 tokens on a decentralized platform',
desc: 'NakaChain is a low-cost and lightning-fast Bitcoin Layer 2 blockchain designed for DeFi apps, enabling the payment of gas fees in Bitcoin. It’s powered by BVM with these modules: Bitcoin for security, Polygon for data availability, and Optimism for execution.' +
'<br/><br/>On the second day of awesomeness, challenge yourself to dominate the market by trading futures on BRC-20 tokens\' prices. The top gainer will be rewarded every hour.' +
'<br/><br/>Total rewards: <span style="color: #FA4E0E">$3,000</span>',
},
{
key: 2,
Expand Down
12 changes: 12 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6455,6 +6455,11 @@ merge2@^1.3.0, merge2@^1.4.1:
resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz"
integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==

mersenne-twister@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/mersenne-twister/-/mersenne-twister-1.1.0.tgz#f916618ee43d7179efcf641bec4531eb9670978a"
integrity sha512-mUYWsMKNrm4lfygPkL3OfGzOPTR2DBlTkBNHM//F6hGp8cLThY897crAlk3/Jo17LEOOjQUrNAx6DvgO77QJkA==

micro-ftch@^0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/micro-ftch/-/micro-ftch-0.3.1.tgz#6cb83388de4c1f279a034fb0cf96dfc050853c5f"
Expand Down Expand Up @@ -7161,6 +7166,13 @@ react-is@^16.13.1, react-is@^16.7.0:
resolved "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz"
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==

react-jazzicon@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/react-jazzicon/-/react-jazzicon-1.0.4.tgz#31e5f6908e042786ba93a9093b852dea1870e7a0"
integrity sha512-/3kWv5vtAhI18GBFoqjpxRTtL+EImuB73PAC02r/zJQ6E+PAUmoBx8edYvTCIYHwS01uFf6N3elTDqSrVPwg4w==
dependencies:
mersenne-twister "^1.1.0"

react-modal-video@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/react-modal-video/-/react-modal-video-2.0.1.tgz#ede12736b306316d33d969cd9a8c826c49e23354"
Expand Down

0 comments on commit 2b2af58

Please sign in to comment.