Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into rtk-campagin
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenhoaidanh committed Oct 16, 2023
2 parents 8cfa997 + d557ea9 commit cbce132
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const ItemWrapper = styled.div`
gap: 8px;
`
export const TokenInfo = ({
showPrice = true,
showPrice = false,
logoSize = '12px',
token,
}: {
Expand Down Expand Up @@ -73,7 +73,7 @@ function InboxItemBridge({
}

return (
<InboxItemWrapper isRead={isRead} onClick={onClick} style={{ ...style, paddingTop: '8px', gap: '6px' }}>
<InboxItemWrapper isRead={isRead} onClick={onClick} style={style}>
<InboxItemRow>
<RowItem>
<InboxIcon type={templateType} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default function AnnouncementItem({
{!expand &&
minimalAssets.map((token, i) => (
<Fragment key={i}>
<TokenInfo token={token} showPrice={false} key={i} logoSize={'14px'} />
<TokenInfo token={token} key={i} logoSize={'14px'} />
{i === minimalAssets.length - 1 ? (minimalAssets.length < slice ? '' : ', ...') : ', '}
</Fragment>
))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const Divider = styled.div`
`

const CustomOption = styled(Row)`
cursor: pointer;
:hover {
background-color: ${({ theme }) => theme.background};
}
Expand Down
20 changes: 5 additions & 15 deletions src/pages/TrueSightV2/pages/RegisterWhitelist/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ import Column from 'components/Column'
import DownloadWalletModal from 'components/DownloadWalletModal'
import Row from 'components/Row'
import { APP_PATHS } from 'constants/index'
import { useActiveWeb3React } from 'hooks'
import useLogin from 'hooks/useLogin'
import { MIXPANEL_TYPE, useMixpanelKyberAI } from 'hooks/useMixpanel'
import useTheme from 'hooks/useTheme'
import SubscribeForm from 'pages/TrueSightV2/pages/RegisterWhitelist/SubscribeForm'
import WaitListForm from 'pages/TrueSightV2/pages/RegisterWhitelist/WaitListForm'
import VerifyCodeModal from 'pages/Verify/VerifyCodeModal'
import { ApplicationModal } from 'state/application/actions'
import { useOpenModal, useWalletModalToggle } from 'state/application/hooks'
import { useOpenModal } from 'state/application/hooks'
import { useSessionInfo } from 'state/authen/hooks'
import { useIsWhiteListKyberAI } from 'state/user/hooks'
import { ButtonText } from 'theme'
Expand All @@ -32,8 +31,6 @@ export default function RegisterWhitelist({ showForm = true }: { showForm?: bool
const navigate = useNavigate()
const theme = useTheme()
const mixpanelHandler = useMixpanelKyberAI()
const { account } = useActiveWeb3React()
const toggleWalletModal = useWalletModalToggle()
const { isLogin } = useSessionInfo()
const { signIn } = useLogin()

Expand Down Expand Up @@ -67,7 +64,7 @@ export default function RegisterWhitelist({ showForm = true }: { showForm?: bool
<>
<WaitListForm
labelColor={theme.text}
style={{ maxWidth: '100%' }}
style={{ width: '100%' }}
desc={
<Text fontSize={14} color={theme.text} lineHeight={'16px'} style={{ lineHeight: '18px' }}>
<Trans>
Expand Down Expand Up @@ -99,11 +96,11 @@ export default function RegisterWhitelist({ showForm = true }: { showForm?: bool
</ConnectWalletButton>
)

if (!account)
if (!isLogin)
return (
<Column gap="20px" alignItems="center" width="fit-content" paddingTop="20px">
<ConnectWalletButton onClick={toggleWalletModal}>
<Trans>Sign in with wallet</Trans>
<ConnectWalletButton onClick={() => signIn()}>
<Trans>Sign-In to Continue</Trans>
</ConnectWalletButton>
<Row color={theme.subText} fontSize="14px" gap="4px" width="fit-content">
<span>Don&apos;t have a wallet?</span>
Expand All @@ -115,13 +112,6 @@ export default function RegisterWhitelist({ showForm = true }: { showForm?: bool
</Column>
)

if (!isLogin)
return (
<ConnectWalletButton onClick={() => signIn()}>
<Trans>Sign-In to Continue</Trans>
</ConnectWalletButton>
)

const btnGetStart = (
<ConnectWalletButton
onClick={() => {
Expand Down

0 comments on commit cbce132

Please sign in to comment.