Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcramer committed Aug 2, 2024
1 parent 0582796 commit bfd8921
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/wallet/components/Wallet.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Children, useMemo, useRef, useEffect } from 'react';
import { Children, useEffect, useMemo, useRef } from 'react';
import type { WalletReact } from '../types';
import { ConnectWallet } from './ConnectWallet';
import { WalletDropdown } from './WalletDropdown';
Expand All @@ -18,7 +18,11 @@ const WalletContent = ({ children }: WalletReact) => {

useEffect(() => {
const handleClickOutside = (event: MouseEvent) => {
if (containerRef.current && !containerRef.current.contains(event.target as Node) && isOpen) {
if (
containerRef.current &&
!containerRef.current.contains(event.target as Node) &&
isOpen
) {
setIsOpen(false);
}
};
Expand All @@ -41,4 +45,4 @@ export const Wallet = ({ children }: WalletReact) => {
<WalletContent>{children}</WalletContent>
</WalletProvider>
);
};
};

0 comments on commit bfd8921

Please sign in to comment.