Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions apps/insights/src/components/PriceFeeds/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ArrowLineDown } from "@phosphor-icons/react/dist/ssr/ArrowLineDown";
import { ArrowSquareOut } from "@phosphor-icons/react/dist/ssr/ArrowSquareOut";
import { ArrowsOutSimple } from "@phosphor-icons/react/dist/ssr/ArrowsOutSimple";
import { ClockCountdown } from "@phosphor-icons/react/dist/ssr/ClockCountdown";
import { StackPlus } from "@phosphor-icons/react/dist/ssr/StackPlus";
import { Star } from "@phosphor-icons/react/dist/ssr/Star";
import { Badge } from "@pythnetwork/component-library/Badge";
import { Button } from "@pythnetwork/component-library/Button";
import {
Expand Down Expand Up @@ -48,9 +48,9 @@ export const PriceFeeds = async () => {
!priceFeedsStaticConfig.featuredComingSoon.includes(symbol),
),
].slice(0, 6);
const featuredRecentlyAdded = filterFeeds(
const featuredFeeds = filterFeeds(
priceFeeds.activeFeeds,
priceFeedsStaticConfig.featuredRecentlyAdded,
priceFeedsStaticConfig.featuredFeeds,
);

return (
Expand Down Expand Up @@ -87,7 +87,7 @@ export const PriceFeeds = async () => {
<FeaturedFeeds
allComingSoon={priceFeeds.comingSoon}
featuredComingSoon={featuredComingSoon.slice(0, 5)}
featuredRecentlyAdded={featuredRecentlyAdded.slice(0, 5)}
featuredFeeds={featuredFeeds.slice(0, 5)}
/>
<PriceFeedsCard
id={PRICE_FEEDS_ANCHOR}
Expand Down Expand Up @@ -120,7 +120,7 @@ export const PriceFeeds = async () => {
<FeaturedFeeds
allComingSoon={priceFeeds.comingSoon}
featuredComingSoon={featuredComingSoon}
featuredRecentlyAdded={featuredRecentlyAdded}
featuredFeeds={featuredFeeds}
/>
</UnstyledTabPanel>
</UnstyledTabs>
Expand All @@ -129,29 +129,29 @@ export const PriceFeeds = async () => {
};

type FeaturedFeedsProps = {
featuredRecentlyAdded: FeaturedFeed[];
featuredFeeds: FeaturedFeed[];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just name this one feeds please

featuredComingSoon: FeaturedFeed[];
allComingSoon: { symbol: string }[];
};

const FeaturedFeeds = ({
featuredRecentlyAdded,
featuredFeeds,
featuredComingSoon,
allComingSoon,
}: FeaturedFeedsProps) => (
<>
<YesterdaysPricesProvider
feeds={Object.fromEntries(
featuredRecentlyAdded.map(({ symbol, product }) => [
featuredFeeds.map(({ symbol, product }) => [
symbol,
product.price_account,
]),
)}
>
<FeaturedFeedsCard
title="Recently Added"
icon={<StackPlus />}
feeds={featuredRecentlyAdded}
title="Featured"
icon={<Star />}
feeds={featuredFeeds}
showPrices
linkFeeds
/>
Expand Down
14 changes: 7 additions & 7 deletions apps/insights/src/static-data/price-feeds.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
export const priceFeeds = {
updateFrequency: "400ms",
featuredRecentlyAdded: [
"Crypto.PYTH/USD",
"FX.EUR/USD",
"Equity.US.NFLX/USD",
"Commodities.WTI1M",
"Crypto.1INCH/USD",
"Equity.US.META/USD",
featuredFeeds: [
"Crypto.ARC/USD",
"Crypto.CDXUSD/USD",
"Equity.GB.CSPX/USD",
"Crypto.MSUSD/USD",
"Crypto.WSTHYPE/STHYPE.RR",
"Crypto.YNETHX/WETH.RR",
],
featuredComingSoon: ["Rates.US1Y"],
};
Loading