Skip to content

Commit

Permalink
chore: update code
Browse files Browse the repository at this point in the history
  • Loading branch information
camewell071 committed Jan 25, 2024
1 parent 1bd3499 commit 7fc0347
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 7 deletions.
27 changes: 27 additions & 0 deletions src/modules/Whitelist/ArcadeBanner/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React, { useEffect, useState } from 'react';
import styles from './styles.module.scss';
import Countdown from '@/modules/Whitelist/stepAirdrop/Countdown';
import dayjs from 'dayjs';
import { TIME_CHAIN_EXPIRED_TIME } from '@/modules/Whitelist/stepAirdrop';
import { Flex, Tooltip } from '@chakra-ui/react';
import { CDN_URL_ICONS } from '@/config';
import { getRaffleJoin } from '@/services/player-share';
import AuthenStorage from '@/utils/storage/authen.storage';
import { useAppSelector } from '@/stores/hooks';
import { commonSelector } from '@/stores/states/common/selector';

interface IProps {
setTabIndex: (_: number) => void;
}

const ArcadeBanner = React.memo(({ setTabIndex }: IProps) => {
return (
<div className={styles.container} onClick={() => setTabIndex(1)}>
<img src={`${CDN_URL_ICONS}/banner-arcade.png`} />
</div>
)
});

ArcadeBanner.displayName = 'ArcadeBanner';

export default ArcadeBanner;
13 changes: 13 additions & 0 deletions src/modules/Whitelist/ArcadeBanner/styles.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.container {
z-index: 20;
img {
max-width: 560px !important;
width: 100%;
-webkit-user-drag: none;
-khtml-user-drag: none;
-moz-user-drag: none;
-o-user-drag: none;
user-drag: none;
cursor: pointer;
}
}
13 changes: 6 additions & 7 deletions src/modules/Whitelist/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ import StepsAirdrop, { TIME_CHAIN_EXPIRED_TIME } from '@/modules/Whitelist/stepA
import useAllowBTC from '@/modules/Whitelist/AllowBTCMessage/useAllowBTC';
import useAllowCelestia from '@/modules/Whitelist/AllowCelestiaMessage/useAllowCelestia';
import useAllowEVM from '@/modules/Whitelist/AllowEVMMessage/useAllowEVM';
import TimechainBanner from '@/modules/Whitelist/TimechainBanner';
import styles from '@/modules/Whitelist/TimechainBanner/styles.module.scss';
import dayjs from 'dayjs';
import Countdown from '@/modules/Whitelist/stepAirdrop/Countdown';
import ArcadeBanner from '@/modules/Whitelist/ArcadeBanner';

const CONTAINER_ID = 'WHITE_LIST_CONTAINER_ID';

Expand Down Expand Up @@ -93,7 +92,7 @@ const Whitelist = () => {
/>
</Flex>
)}
<TimechainBanner setTabIndex={setIndex} />
<ArcadeBanner setTabIndex={setIndex} />
</Flex>
<div className={s.tokenSection}>
<Box w="100%" overflow="hidden">
Expand All @@ -106,18 +105,18 @@ const Whitelist = () => {
<Tabs variant="unstyled" index={index} onChange={(tabIndex) => setIndex(tabIndex)}>
<TabList mb="32px" overflow="hidden">
<Tab>Start here</Tab>
<Tab>Airdrop 1</Tab>
<Tab>Explore the ecosystem</Tab>
<Tab>Experience BVM</Tab>
<Tab>Airdrop</Tab>
</TabList>
<TabPanels w="100%">
<TabPanel>
<Steps />
</TabPanel>
<TabPanel>
<StepsAirdrop setIndex={setIndex}/>
<StepsEco />
</TabPanel>
<TabPanel>
<StepsEco />
<StepsAirdrop setIndex={setIndex}/>
</TabPanel>
</TabPanels>
</Tabs>
Expand Down

0 comments on commit 7fc0347

Please sign in to comment.