Skip to content

Commit 485df56

Browse files
committed
Small refactor
1 parent 2a8f3d2 commit 485df56

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/AgentConnectButton.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,14 @@ export const AgentConnectButton = memo(
3434
const { t } = useTranslation();
3535

3636
const Inner = onClick !== undefined ? "button" : "a";
37-
const innerProps = (onClick !== undefined ? { onClick } : { href }) as any;
3837

3938
return (
4039
<div className={className} style={style} ref={ref}>
4140
<span className="agentconnect-button__preload-hover" />
42-
<Inner className="agentconnect-button__link" {...innerProps} />
41+
<Inner
42+
className="agentconnect-button__link"
43+
{...((onClick !== undefined ? { onClick } : { href }) as any)}
44+
/>
4345
<p>
4446
<a
4547
className={cx(

0 commit comments

Comments
 (0)