Skip to content

Commit

Permalink
fix: qrcode
Browse files Browse the repository at this point in the history
  • Loading branch information
heisenberg-2077 committed Sep 14, 2023
1 parent 3ce511f commit d4fcf33
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/ui/component/ScanCopyQRCode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import IconRefresh from 'ui/assets/urlrefresh.svg';
import { ConnectStatus } from './WalletConnect/ConnectStatus';
import { useSessionStatus } from './WalletConnect/useSessionStatus';
import { Account } from '@/background/service/preference';
import Spin from './Spin';

interface Props {
showURL: boolean;
Expand Down Expand Up @@ -87,8 +88,19 @@ const ScanCopyQRCode: React.FC<Props> = ({
</div>
</div>
{!showURL && (
<div className="qrcode mb-0" {...hoverProps}>
<QRCode value={qrcodeURL} size={170} />
<div className="qrcode mb-0 relative" {...hoverProps}>
{!qrcodeURL ? (
<div
className={clsx(
'bg-white bg-opacity-70 absolute inset-0',
'flex items-center justify-center'
)}
>
<Spin />
</div>
) : (
<QRCode value={qrcodeURL} size={170} />
)}
{isHovering && (
<div className="refresh-container">
<div className="refresh-wrapper">
Expand Down

0 comments on commit d4fcf33

Please sign in to comment.