1
1
import React , { useEffect , useMemo , useState } from 'react' ;
2
2
import { useTranslation } from 'react-i18next' ;
3
- import { Popup , Item , TokenWithChain , AddressViewer } from '@/ui/component' ;
3
+ import {
4
+ Popup ,
5
+ Item ,
6
+ TokenWithChain ,
7
+ AddressViewer ,
8
+ Empty ,
9
+ } from '@/ui/component' ;
4
10
import { Button , message , Skeleton , Tooltip } from 'antd' ;
5
11
import { PopupProps } from '@/ui/component/Popup' ;
6
12
import { noop , set } from 'lodash' ;
@@ -299,7 +305,7 @@ const Selector = ({
299
305
</ div >
300
306
</ div >
301
307
< div className = "overflow-y-auto flex-1 relative px-20" >
302
- { isSelectChain ? (
308
+ { ! sortedList ?. length ? null : isSelectChain ? (
303
309
< FixedSizeList < RechargeChainItem [ ] >
304
310
width = { '100%' }
305
311
height = { 328 }
@@ -320,6 +326,18 @@ const Selector = ({
320
326
{ AddressRow }
321
327
</ FixedSizeList >
322
328
) }
329
+ { ! sortedList ?. length && (
330
+ < Empty
331
+ className = "mt-[75px]"
332
+ title = {
333
+ < span className = "text-13 text-r-neutral-foot text-center" >
334
+ { isSelectChain
335
+ ? t ( 'page.gasAccount.withdrawPopup.noEligibleChain' )
336
+ : t ( 'page.gasAccount.withdrawPopup.noEligibleAddr' ) }
337
+ </ span >
338
+ }
339
+ />
340
+ ) }
323
341
</ div >
324
342
</ div >
325
343
</ Popup >
@@ -510,8 +528,12 @@ const WithdrawContent = ({
510
528
/>
511
529
</ div >
512
530
</ div >
513
- ) : (
531
+ ) : ! selectedAccount ? (
514
532
< AddressRightAreaInItem account = { selectedAccount } />
533
+ ) : (
534
+ < span className = "text-15 font-medium text-r-neutral-title1" >
535
+ { t ( 'page.gasAccount.withdrawPopup.selectAddr' ) }
536
+ </ span >
515
537
)
516
538
}
517
539
hoverBorder = { ! loading }
@@ -527,8 +549,27 @@ const WithdrawContent = ({
527
549
py = { 0 }
528
550
className = "rounded-[6px] w-full h-[52px]"
529
551
bgColor = "var(--r-neutral-card2, #F2F4F7)"
552
+ hoverBorder = { ! loading }
553
+ right = { loading ? ( ) => null : undefined }
530
554
left = {
531
- chainInfo ? (
555
+ loading ? (
556
+ < div
557
+ className = { clsx ( 'flex items-center gap-[6px] ' , [
558
+ 'rounded-[2px]' ,
559
+ ] ) }
560
+ >
561
+ < Skeleton . Avatar
562
+ className = "rounded-[12px] w-[24px] h-[24px]"
563
+ active
564
+ />
565
+ < div className = "flex flex-col overflow-hidden gap-[6px]" >
566
+ < Skeleton . Input
567
+ className = "rounded w-[89px] h-[16px]"
568
+ active
569
+ />
570
+ </ div >
571
+ </ div >
572
+ ) : chainInfo ? (
532
573
< div
533
574
className = { clsx ( 'flex items-center gap-[6px] ' , [
534
575
'rounded-[2px]' ,
0 commit comments