Skip to content

Commit

Permalink
economics - chain name clickable to chain page
Browse files Browse the repository at this point in the history
  • Loading branch information
manishiwa committed Sep 17, 2024
1 parent 2579cca commit 1af6186
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions components/layout/Economics/ChainBreakdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
TooltipTrigger,
} from "@/components/layout/Tooltip";
import { useMaster } from "@/contexts/MasterContext";
import Link from "next/link";

const regularMetrics = ["profit", "revenue", "costs", "size", "profit_margin"];
interface DAvailability {
Expand Down Expand Up @@ -1040,9 +1041,17 @@ export default function ChainBreakdown({
</div>

<div>
{triggerShrink
? master.chains[item.key].name_short
: AllChainsByKeys[item.key].label}
<Link
className="hover:underline whitespace-nowrap"
href={`https://www.growthepie.xyz/chains/${AllChainsByKeys[item.key].urlKey}`}
onClick={(e) => {
e.stopPropagation();
}}
>
{triggerShrink
? master.chains[item.key].name_short
: AllChainsByKeys[item.key].label}
</Link>
</div>

<div
Expand Down

0 comments on commit 1af6186

Please sign in to comment.