Skip to content

Commit 50de394

Browse files
authored
feat(feeds): add systems explorer links (#1076)
2 parents 28f483b + 446566e commit 50de394

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

src/components/DataTables/CustomFeeds.tsx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,23 @@ const CustomFeeds = () => {
1616
</thead>
1717
<tbody>
1818
{tableData.map((row, index) => {
19+
const feedUrl = `https://flare-systems-explorer.flare.network/price-feeds/custom?feed=${encodeURIComponent(
20+
row.feed_id,
21+
)}`;
22+
1923
return (
2024
<tr key={index} className="table-row">
21-
<td className="regular-font">{row.feed_name}</td>
25+
<td className="regular-font">
26+
<Link
27+
to={feedUrl}
28+
target="_blank"
29+
rel="noopener noreferrer"
30+
className="hover:underline"
31+
title={`Open ${row.feed_name} in Flare Systems Explorer`}
32+
>
33+
{row.feed_name}
34+
</Link>
35+
</td>
2236
<td className="feed-id mono-font">
2337
<div className="feed-id-container">
2438
<span className="feed-id-text">{row.feed_id}</span>

src/components/DataTables/FtsoFeeds.tsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import Tippy from "@tippyjs/react";
44
import "tippy.js/dist/tippy.css";
55
import CopyButton from "../CopyButton";
66
import tableData from "../../../automations/ftso_feeds.json";
7+
import Link from "@docusaurus/Link";
78

89
type FeedRow = {
910
feed_name: string;
@@ -68,9 +69,23 @@ const FtsoFeeds: React.FC<FeedsProps> = ({
6869
<tbody>
6970
{data.map((row, i) => {
7071
const { icon, tooltip } = getRiskIcon(row.risk);
72+
const feedUrl = `https://flare-systems-explorer.flare.network/price-feeds/ftso?feed=${encodeURIComponent(
73+
row.feed_id,
74+
)}`;
75+
7176
return (
7277
<tr key={`${row.feed_id}-${i}`} className="table-row">
73-
<td className="regular-font">{row.feed_name}</td>
78+
<td className="regular-font">
79+
<Link
80+
to={feedUrl}
81+
target="_blank"
82+
rel="noopener noreferrer"
83+
className="hover:underline"
84+
title={`Open ${row.feed_name} in Flare Systems Explorer`}
85+
>
86+
{row.feed_name}
87+
</Link>
88+
</td>
7489

7590
{showIndex && (
7691
<td className="mono-font feed-index">

0 commit comments

Comments
 (0)