File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 11import React from 'react' ;
22import { Button } from '@/components/ui/button' ;
3- import { useAppKit , useAppKitModal } from '@reown/appkit' ;
3+ import { useAppKit } from '@reown/appkit' ;
44
55const WALLET_ICON = "/lovable-uploads/AW.png" ;
66const PORTAL_ICON_AVIF = "/lovable-uploads/AP1.avif" ;
@@ -11,8 +11,9 @@ const shortAddress = (addr: string) =>
1111 addr ? addr . slice ( 0 , 6 ) + '...' + addr . slice ( - 4 ) : '' ;
1212
1313const ConnectButton = ( ) => {
14- const { open } = useAppKitModal ( ) ;
15- const { account, disconnect } = useAppKit ( ) ;
14+ // Ajusta esta línea según el API real de useAppKit.
15+ // Si no existe openConnectModal, revisa la doc oficial.
16+ const { account, disconnect, openConnectModal } = useAppKit ( ) ;
1617
1718 return (
1819 < div className = "flex flex-wrap items-center gap-3" >
@@ -53,7 +54,7 @@ const ConnectButton = () => {
5354 transition-all duration-200 ease-in-out
5455 hover:shadow-lg hover:scale-110 active:scale-95 focus-visible:ring-2 focus-visible:ring-alien-gold
5556 "
56- onClick = { open }
57+ onClick = { ( ) => ( openConnectModal ? openConnectModal ( ) : alert ( 'Función para conectar wallet no implementada' ) ) }
5758 title = "Conectar Wallet"
5859 aria-label = "Conectar Wallet"
5960 type = "button"
You can’t perform that action at this time.
0 commit comments