Skip to content

Commit

Permalink
Merge branch 'next' into governance-tx-flow
Browse files Browse the repository at this point in the history
  • Loading branch information
bpierre committed Dec 17, 2024
2 parents 30addf1 + ef789e0 commit a668607
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 22 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
5 changes: 4 additions & 1 deletion frontend/app/src/screens/LoanScreen/LoanScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,10 @@ export function LoanScreen() {
if (!loan.data) {
return;
}
const id = getPrefixedTroveId(loan.data.collIndex, loan.data.troveId);
const id = getPrefixedTroveId(
loan.data.collIndex,
loan.data.troveId,
);
router.push(
`/loan/${TABS[index].id}?id=${id}`,
{ scroll: false },
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/src/screens/StakeScreen/StakeScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function StakeScreen() {
}))}
selected={TABS.findIndex(({ id }) => id === action)}
onSelect={(index) => {
router.push(`/stake/${TABS[index].id}`);
router.push(`/stake/${TABS[index].id}`, { scroll: false });
}}
/>

Expand Down

0 comments on commit a668607

Please sign in to comment.