diff --git a/apps/insights/src/components/Overview/index.tsx b/apps/insights/src/components/Overview/index.tsx index 81e61a4d91..7b3898ac26 100644 --- a/apps/insights/src/components/Overview/index.tsx +++ b/apps/insights/src/components/Overview/index.tsx @@ -9,6 +9,7 @@ import PriceFeedsLight from "./price-feeds-light.svg"; import PublishersDark from "./publishers-dark.svg"; import PublishersLight from "./publishers-light.svg"; import { TabList } from "./tab-list"; +import { Cluster, getFeeds } from "../../services/pyth"; import { totalVolumeTraded, activeChains, @@ -21,148 +22,160 @@ import { ChartCard } from "../ChartCard"; import { FormattedDate } from "../FormattedDate"; import { FormattedNumber } from "../FormattedNumber"; -export const Overview = () => ( -
-

Overview

- - ({ - x: date, - displayX: , - y: volume, - displayY: ( +export const Overview = async () => { + const priceFeeds = await getFeeds(Cluster.Pythnet); + const today = new Date(); + const feedCounts = [ + ...activeFeeds.map(({ date, numFeeds }) => ({ + x: date, + displayX: , + y: numFeeds, + })), + { + x: today, + displayX: , + y: priceFeeds.length, + }, + ]; + return ( +
+

Overview

+ + ({ + x: date, + displayX: , + y: volume, + displayY: ( + + ), + }))} + miniStat={ + + } + stat={ - ), - }))} - miniStat={ - - } - stat={ - - } - /> - ({ - x: date, - displayX: , - y: numPublishers, - }))} - miniStat={ - - } - stat={activePublishers.at(-1)?.numPublishers} - /> - ({ - x: date, - displayX: , - y: numFeeds, - }))} - miniStat={ - - } - stat={activeFeeds.at(-1)?.numFeeds} - /> - ({ - x: date, - displayX: , - y: chains, - }))} - miniStat={ - - } - stat={activeChains.at(-1)?.chains} - /> - - -
- INSIGHTS -

Get the most from the Pyth Network

-

- Insights Hub delivers transparency over the network status and - performance, and maximizes productivity while integrating. -

-
- - - - - ), - }, - { - id: "price feeds", - className: styles.imagePanel ?? "", - children: ( - <> - - - - ), - }, - ]} - /> - -
- - -
-
-
-); + } + /> + ({ + x: date, + displayX: , + y: numPublishers, + }))} + miniStat={ + + } + stat={activePublishers.at(-1)?.numPublishers} + /> + + } + stat={feedCounts.at(-1)?.y} + /> + ({ + x: date, + displayX: , + y: chains, + }))} + miniStat={ + + } + stat={activeChains.at(-1)?.chains} + /> +
+ +
+ INSIGHTS +

Get the most from the Pyth Network

+

+ Insights Hub delivers transparency over the network status and + performance, and maximizes productivity while integrating. +

+
+ + + + + ), + }, + { + id: "price feeds", + className: styles.imagePanel ?? "", + children: ( + <> + + + + ), + }, + ]} + /> + +
+ + +
+
+
+ ); +};