File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
packages/vechain-kit/src/components/WalletButton Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,6 @@ type WalletDisplayProps = {
1313export const WalletDisplay = ( { variant } : WalletDisplayProps ) => {
1414 const { account } = useWallet ( ) ;
1515 const [ isSmallMobile ] = useMediaQuery ( '(max-width: 480px)' ) ;
16- if ( ! account ) return < Spinner /> ;
17-
18- if ( variant === 'icon' ) {
19- return null ;
20- }
2116
2217 const accountDomain = useMemo ( ( ) => {
2318 const isLongDomain = account ?. domain && account . domain . length > 18 ;
@@ -26,6 +21,12 @@ export const WalletDisplay = ({ variant }: WalletDisplayProps) => {
2621 : account ?. domain ;
2722 } , [ isSmallMobile , account ?. domain ] ) ;
2823
24+ if ( ! account ) return < Spinner /> ;
25+
26+ if ( variant === 'icon' ) {
27+ return null ;
28+ }
29+
2930 if ( variant === 'iconAndDomain' ) {
3031 return account . domain ? (
3132 < Text fontSize = "sm" > { accountDomain } </ Text >
You can’t perform that action at this time.
0 commit comments