Skip to content

Commit

Permalink
fix: useState conditionally
Browse files Browse the repository at this point in the history
  • Loading branch information
RetricSu committed Aug 1, 2024
1 parent 510df67 commit 475cea0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/book-app/components/wallet/connect-nostr.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,7 @@ const Popup: React.FC<PopupProps> = ({
onDisconnect,
ckbAddress,
}) => {
if (!show) return null;

const [balance, setBalance] = useState<string>();

useEffect(() => {
if (!ckbAddress) return;

Expand All @@ -102,6 +99,7 @@ const Popup: React.FC<PopupProps> = ({
);
}, [ckbAddress]);

if (!show) return null;
return (
<div className="fixed inset-0 bg-gray-600 bg-opacity-50 flex justify-center items-center">
<div className="bg-white p-4 rounded-2xl shadow-lg w-1/3 items-center align-middle text-center">
Expand Down

0 comments on commit 475cea0

Please sign in to comment.