Skip to content

Commit 39d9e7a

Browse files
committed
feat(insights): implement new disclaimer banners
1 parent f197e35 commit 39d9e7a

File tree

7 files changed

+120
-54
lines changed

7 files changed

+120
-54
lines changed

apps/insights/src/components/PriceFeed/chart-page.module.scss

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,28 @@
88
overflow: hidden;
99
}
1010
}
11+
12+
.disclaimer {
13+
display: flex;
14+
flex-flow: row nowrap;
15+
gap: theme.spacing(1);
16+
padding: theme.spacing(3);
17+
18+
.disclaimerIcon {
19+
flex: none;
20+
color: theme.color("states", "info", "icon");
21+
font-size: theme.spacing(6);
22+
}
23+
24+
.disclaimerBody {
25+
@include theme.text("sm", "normal");
26+
27+
color: theme.color("paragraph");
28+
padding: 0 theme.spacing(2);
29+
line-height: 150%;
30+
31+
b {
32+
font-weight: theme.font-weight("semibold");
33+
}
34+
}
35+
}

apps/insights/src/components/PriceFeed/chart-page.tsx

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
import { Info } from "@phosphor-icons/react/dist/ssr/Info";
12
import { Card } from "@pythnetwork/component-library/Card";
3+
import { Link } from "@pythnetwork/component-library/Link";
24
import { notFound } from "next/navigation";
35

46
import { Chart } from "./chart";
@@ -24,8 +26,40 @@ export const ChartPage = async ({ params }: Props) => {
2426
<div className={styles.chart}>
2527
<Chart symbol={symbol} feedId={feed.product.price_account} />
2628
</div>
29+
<Disclaimer symbol={symbol} displaySymbol={feed.product.display_symbol} />
2730
</Card>
2831
) : (
2932
notFound()
3033
);
3134
};
35+
36+
type DisclaimerProps = {
37+
displaySymbol: string;
38+
symbol: string;
39+
};
40+
41+
const Disclaimer = ({ displaySymbol, symbol }: DisclaimerProps) => {
42+
return NEW_YORK_FED_SYMBOLS.has(symbol) ? (
43+
<div className={styles.disclaimer}>
44+
<Info className={styles.disclaimerIcon} weight="fill" />
45+
<p className={styles.disclaimerBody}>
46+
The <b>{displaySymbol}</b> is subject to the Terms of Use posted at{" "}
47+
<Link target="_blank" rel="noreferrer" href="https://newyorkfed.org">
48+
newyorkfed.org
49+
</Link>
50+
. The New York Fed is not responsible for publication of the{" "}
51+
<b>{displaySymbol}</b> by <b>Pyth Network</b> or its publishers, does
52+
not sanction or endorse any particular republication, and has no
53+
liability for your use.
54+
</p>
55+
</div>
56+
) : null; // eslint-disable-line unicorn/no-null
57+
};
58+
59+
const NEW_YORK_FED_SYMBOLS = new Set([
60+
"Rates.SOFR",
61+
"Rates.EFFR",
62+
"Rates.OBFR",
63+
"Rates.BGCR",
64+
"Rates.TGCR",
65+
]);

apps/insights/src/components/PriceFeeds/coming-soon-list.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export const ComingSoonList = ({ comingSoonSymbols }: Props) => {
7272
() =>
7373
filteredFeeds.map(({ symbol }) => ({
7474
id: symbol,
75+
href: `/price-feeds/${encodeURIComponent(symbol)}`,
7576
data: {
7677
priceFeedName: <PriceFeedTag compact symbol={symbol} />,
7778
assetClass: <AssetClassTag symbol={symbol} />,

apps/insights/src/components/PriceFeeds/index.module.scss

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -86,24 +86,4 @@
8686
@include theme.max-width;
8787
}
8888
}
89-
90-
.trademarkDisclaimer {
91-
margin-top: theme.spacing(6);
92-
width: 100%;
93-
padding: theme.spacing(4);
94-
display: flex;
95-
flex-flow: column nowrap;
96-
gap: theme.spacing(4);
97-
color: theme.color("foreground");
98-
font-size: theme.font-size("sm");
99-
100-
@include theme.max-width;
101-
102-
.trademarkDisclaimerHeader {
103-
@include theme.text("lg", "medium");
104-
105-
color: theme.color("heading");
106-
margin-bottom: theme.spacing(2);
107-
}
108-
}
10989
}

apps/insights/src/components/PriceFeeds/index.tsx

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -124,32 +124,6 @@ export const PriceFeeds = async () => {
124124
/>
125125
</UnstyledTabPanel>
126126
</UnstyledTabs>
127-
<div className={styles.trademarkDisclaimer}>
128-
<h3 className={styles.trademarkDisclaimerHeader}>
129-
Trademark Disclaimer
130-
</h3>
131-
<p>
132-
This website may display ticker symbols, product names, and other
133-
identifiers that are trademarks, service marks or trade names of third
134-
parties. Such display is for informational purposes only and does not
135-
constitute any claim of ownership thereof by Pyth Data Association or
136-
any of its subsidiaries and other affiliates (collectively,
137-
&quot;Association&quot;) or any sponsorship or endorsement by
138-
Association of any associated products or services, and should not be
139-
construed as indicating any affiliation, sponsorship or other
140-
connection between Association and the third-party owners of such
141-
identifiers. Any such third-party identifiers associated with
142-
financial data are made solely to identify the relevant financial
143-
products for which price data is made available via the website. All
144-
trademarks, service marks, logos, product names, trade names and
145-
company names mentioned on the website are the property of their
146-
respective owners and are protected by trademark and other
147-
intellectual property laws. Association makes no representations or
148-
warranties with respect to any such identifiers or any data or other
149-
information associated therewith and reserves the right to modify or
150-
remove any such displays at its discretion.
151-
</p>
152-
</div>
153127
</div>
154128
);
155129
};
@@ -179,7 +153,6 @@ const FeaturedFeeds = ({
179153
icon={<Star />}
180154
feeds={featuredFeeds}
181155
showPrices
182-
linkFeeds
183156
/>
184157
</YesterdaysPricesProvider>
185158
<FeaturedFeedsCard
@@ -217,7 +190,6 @@ type FeaturedFeedsCardProps<T extends ElementType> = Omit<
217190
"children"
218191
> & {
219192
showPrices?: boolean | undefined;
220-
linkFeeds?: boolean | undefined;
221193
feeds: FeaturedFeed[];
222194
};
223195

@@ -232,7 +204,6 @@ type FeaturedFeed = {
232204

233205
const FeaturedFeedsCard = <T extends ElementType>({
234206
showPrices,
235-
linkFeeds,
236207
feeds,
237208
...props
238209
}: FeaturedFeedsCardProps<T>) => (
@@ -242,9 +213,7 @@ const FeaturedFeedsCard = <T extends ElementType>({
242213
<Card
243214
key={feed.product.price_account}
244215
variant="tertiary"
245-
{...(linkFeeds && {
246-
href: `/price-feeds/${encodeURIComponent(feed.symbol)}`,
247-
})}
216+
href={`/price-feeds/${encodeURIComponent(feed.symbol)}`}
248217
>
249218
<div className={styles.feedCardContents}>
250219
<PriceFeedTag symbol={feed.symbol} />

apps/insights/src/components/Root/footer.module.scss

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
@include theme.breakpoint("sm") {
1818
flex-flow: row nowrap;
1919
align-items: center;
20-
margin-bottom: theme.spacing(12);
2120
}
2221

2322
.main {
@@ -44,7 +43,7 @@
4443

4544
.divider {
4645
display: none;
47-
background-color: theme.color("border");
46+
background-color: theme.color("background", "secondary");
4847
width: 1px;
4948

5049
@include theme.breakpoint("sm") {
@@ -85,11 +84,41 @@
8584
}
8685
}
8786

87+
.trademarkDisclaimer {
88+
@include theme.max-width;
89+
90+
.trademarkDisclaimerContent {
91+
padding-top: theme.spacing(6);
92+
padding-bottom: theme.spacing(6);
93+
border-top: 1px solid theme.color("background", "secondary");
94+
border-bottom: 1px solid theme.color("background", "secondary");
95+
color: theme.color("muted");
96+
97+
@include theme.breakpoint("sm") {
98+
padding-top: theme.spacing(12);
99+
padding-bottom: theme.spacing(12);
100+
}
101+
102+
.trademarkDisclaimerHeader {
103+
@include theme.text("sm", "medium");
104+
105+
margin-bottom: theme.spacing(2);
106+
}
107+
108+
.trademarkDisclaimerBody {
109+
@include theme.text("xs", "normal");
110+
111+
line-height: 150%;
112+
}
113+
}
114+
}
115+
88116
.bottomContent {
89117
display: flex;
90118
gap: theme.spacing(6);
91119
flex-flow: column nowrap;
92120
justify-content: space-between;
121+
margin-top: theme.spacing(6);
93122

94123
@include theme.max-width;
95124

apps/insights/src/components/Root/footer.tsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,34 @@ export const Footer = () => (
3838
))}
3939
</div>
4040
</div>
41+
<div className={styles.trademarkDisclaimer}>
42+
<div className={styles.trademarkDisclaimerContent}>
43+
<h3 className={styles.trademarkDisclaimerHeader}>
44+
TRADEMARK DISCLAIMER
45+
</h3>
46+
<p className={styles.trademarkDisclaimerBody}>
47+
This website may display ticker symbols, product names, and other
48+
identifiers that are trademarks, service marks or trade names of third
49+
parties. Such display is for informational purposes only and does not
50+
constitute any claim of ownership thereof by Pyth Data Association or
51+
any of its subsidiaries and other affiliates (collectively,
52+
&quot;Association&quot;) or any sponsorship or endorsement by
53+
Association of any associated products or services, and should not be
54+
construed as indicating any affiliation, sponsorship or other
55+
connection between Association and the third-party owners of such
56+
identifiers. Any such third-party identifiers associated with
57+
financial data are made solely to identify the relevant financial
58+
products for which price data is made available via the website. All
59+
trademarks, service marks, logos, product names, trade names and
60+
company names mentioned on the website are the property of their
61+
respective owners and are protected by trademark and other
62+
intellectual property laws. Association makes no representations or
63+
warranties with respect to any such identifiers or any data or other
64+
information associated therewith and reserves the right to modify or
65+
remove any such displays at its discretion.
66+
</p>
67+
</div>
68+
</div>
4169
<div className={styles.bottomContent}>
4270
<small className={styles.copyright}>© 2025 Pyth Data Association</small>
4371
<div className={styles.legal}>

0 commit comments

Comments
 (0)