Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/fix/style-tune-c' into tmp/20250117
Browse files Browse the repository at this point in the history
  • Loading branch information
dmy147 committed Jan 20, 2025
2 parents 843cb38 + 0470951 commit e1ba94d
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 5 deletions.
5 changes: 4 additions & 1 deletion _raw/locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2348,9 +2348,12 @@
"amount": "Amount",
"to": "To",
"selectChain": "Select Chain",
"selectAddr": "Select Address",
"recipientAddress": "Recipient address",
"destinationChain": "Destination chain",
"deductGasFees": "Received amount will deduct gas fees"
"deductGasFees": "Received amount will deduct gas fees",
"noEligibleAddr": "No eligible address for withdrawal",
"noEligibleChain": "No eligible chain for withdrawal"
},
"withdrawConfirmModal": {
"title": "Transferred to your DeBank L2 Wallet",
Expand Down
49 changes: 45 additions & 4 deletions src/ui/views/GasAccount/components/WithdrawPopup.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import React, { useEffect, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { Popup, Item, TokenWithChain, AddressViewer } from '@/ui/component';
import {
Popup,
Item,
TokenWithChain,
AddressViewer,
Empty,
} from '@/ui/component';
import { Button, message, Skeleton, Tooltip } from 'antd';
import { PopupProps } from '@/ui/component/Popup';
import { noop, set } from 'lodash';
Expand Down Expand Up @@ -299,7 +305,7 @@ const Selector = ({
</div>
</div>
<div className="overflow-y-auto flex-1 relative px-20">
{isSelectChain ? (
{!sortedList?.length ? null : isSelectChain ? (
<FixedSizeList<RechargeChainItem[]>
width={'100%'}
height={328}
Expand All @@ -320,6 +326,18 @@ const Selector = ({
{AddressRow}
</FixedSizeList>
)}
{!sortedList?.length && (
<Empty
className="mt-[75px]"
title={
<span className="text-13 text-r-neutral-foot text-center">
{isSelectChain
? t('page.gasAccount.withdrawPopup.noEligibleChain')
: t('page.gasAccount.withdrawPopup.noEligibleAddr')}
</span>
}
/>
)}
</div>
</div>
</Popup>
Expand Down Expand Up @@ -510,8 +528,12 @@ const WithdrawContent = ({
/>
</div>
</div>
) : (
) : !selectedAccount ? (
<AddressRightAreaInItem account={selectedAccount} />
) : (
<span className="text-15 font-medium text-r-neutral-title1">
{t('page.gasAccount.withdrawPopup.selectAddr')}
</span>
)
}
hoverBorder={!loading}
Expand All @@ -527,8 +549,27 @@ const WithdrawContent = ({
py={0}
className="rounded-[6px] w-full h-[52px]"
bgColor="var(--r-neutral-card2, #F2F4F7)"
hoverBorder={!loading}
right={loading ? () => null : undefined}
left={
chainInfo ? (
loading ? (
<div
className={clsx('flex items-center gap-[6px] ', [
'rounded-[2px]',
])}
>
<Skeleton.Avatar
className="rounded-[12px] w-[24px] h-[24px]"
active
/>
<div className="flex flex-col overflow-hidden gap-[6px]">
<Skeleton.Input
className="rounded w-[89px] h-[16px]"
active
/>
</div>
</div>
) : chainInfo ? (
<div
className={clsx('flex items-center gap-[6px] ', [
'rounded-[2px]',
Expand Down

0 comments on commit e1ba94d

Please sign in to comment.