Skip to content

Commit

Permalink
more lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
zaidarain1 committed Jul 26, 2024
1 parent 5c46408 commit 4b9d966
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 33 deletions.
68 changes: 36 additions & 32 deletions examples/passport/next-rainbow-kit/src/components/Connect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,16 @@ export function Connect() {
&& (!authenticationStatus || authenticationStatus === 'authenticated');
return (
<div
{...(!ready && {
'aria-hidden': true,
style: {
opacity: 0,
pointerEvents: 'none',
userSelect: 'none',
},
})}
aria-hidden={!ready ? true : undefined}
style={
!ready
? {
opacity: 0,
pointerEvents: 'none',
userSelect: 'none',
}
: undefined
}
>
{(() => {
if (!connected) {
Expand All @@ -60,33 +62,35 @@ export function Connect() {
type="button"
>
{chain.hasIcon && (
<div
style={{
background: chain.iconBackground,
width: 12,
height: 12,
borderRadius: 999,
overflow: 'hidden',
marginRight: 4,
}}
>
{chain.iconUrl && (
<img
alt={chain.name ?? 'Chain icon'}
src={chain.iconUrl}
style={{ width: 12, height: 12 }}
/>
)}
</div>
<div
style={{
background: chain.iconBackground,
width: 12,
height: 12,
borderRadius: 999,
overflow: 'hidden',
marginRight: 4,
}}
>
{chain.iconUrl && (
<img
alt={chain.name ?? 'Chain icon'}
src={chain.iconUrl}
style={{ width: 12, height: 12 }}
/>
)}
</div>
)}
{chain.name}
</button>
<button type='button' onClick={async () => {
setDisconnectTxt('Disconnecting ...');
const userinfo = await passportInstance.getUserInfo();
if (userinfo) await passportInstance.logout();
disconnect();
}}
<button
type="button"
onClick={async () => {
setDisconnectTxt('Disconnecting ...');
const userinfo = await passportInstance.getUserInfo();
if (userinfo) await passportInstance.logout();
disconnect();
}}
>
{disconnectTxt}
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ export function ConnectorsList() {
}
</div>
);
}
}

0 comments on commit 4b9d966

Please sign in to comment.