Skip to content

Commit

Permalink
ProtocolStats: use Link for the account button
Browse files Browse the repository at this point in the history
  • Loading branch information
bpierre committed Dec 17, 2024
1 parent 3ff8976 commit d504a93
Showing 1 changed file with 32 additions and 20 deletions.
52 changes: 32 additions & 20 deletions frontend/app/src/comps/ProtocolStats/ProtocolStats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { AnchorTextButton, HFlex, shortenAddress, TokenIcon } from "@liquity2/ui
import { blo } from "blo";
import * as dn from "dnum";
import Image from "next/image";
import Link from "next/link";

const DISPLAYED_PRICES = ["LQTY", "BOLD", "ETH"] as const;

Expand Down Expand Up @@ -57,30 +58,41 @@ export function ProtocolStats() {
/>
))}
{account.address && (
<AnchorTextButton
<Link
id="footer-account-button"
href={`/account?address=${account.address}`}
label={
<HFlex gap={4} alignItems="center">
<Image
alt=""
width={16}
height={16}
src={blo(account.address)}
className={css({
borderRadius: "50%",
})}
/>
passHref
legacyBehavior
scroll={true}
>
<AnchorTextButton
label={
<HFlex gap={4} alignItems="center">
<Image
alt=""
width={16}
height={16}
src={blo(account.address)}
className={css({
borderRadius: "50%",
})}
/>

<HFlex gap={8}>
<span>{shortenAddress(account.address, 3)}</span>
{shortenAddress(account.address, 3)}
</HFlex>
</HFlex>
}
className={css({
color: "content",
})}
/>
}
className={css({
color: "content",
borderRadius: 4,
_focusVisible: {
outline: "2px solid token(colors.focused)",
},
_active: {
translate: "0 1px",
},
})}
/>
</Link>
)}
</HFlex>
</div>
Expand Down

0 comments on commit d504a93

Please sign in to comment.