Skip to content

Commit 18863e2

Browse files
committed
chore(pricefeeds) fix card component
1 parent 097e0bc commit 18863e2

File tree

5 files changed

+98
-20
lines changed

5 files changed

+98
-20
lines changed

components/ProductCard.tsx

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ interface ProductCardProps {
1414
ctaText: string;
1515
href: string;
1616
className?: string;
17+
quickActions?: Array<{
18+
title: string;
19+
href: string;
20+
icon: React.ReactNode;
21+
}>;
1722
}
1823

1924
export function ProductCard({
@@ -26,6 +31,7 @@ export function ProductCard({
2631
ctaText,
2732
href,
2833
className = "",
34+
quickActions = [],
2935
}: ProductCardProps) {
3036
return (
3137
<div
@@ -65,6 +71,39 @@ export function ProductCard({
6571
))}
6672
</div>
6773

74+
{/* Quick Actions */}
75+
{quickActions.length > 0 && (
76+
<div className="grid grid-cols-1 gap-2 mb-6">
77+
{quickActions.map((action, index) => (
78+
<Link
79+
key={index}
80+
href={action.href}
81+
className="flex items-center gap-3 p-3 bg-gray-50 dark:bg-gray-700 rounded-lg border border-gray-200 dark:border-gray-600 hover:bg-gray-100 dark:hover:bg-gray-600 transition-colors text-sm"
82+
>
83+
<div className="text-blue-600 dark:text-blue-400 text-sm flex-shrink-0">
84+
{action.icon}
85+
</div>
86+
<span className="text-gray-700 dark:text-gray-300 font-medium">
87+
{action.title}
88+
</span>
89+
<svg
90+
className="w-3 h-3 ml-auto text-gray-400"
91+
fill="none"
92+
stroke="currentColor"
93+
viewBox="0 0 24 24"
94+
>
95+
<path
96+
strokeLinecap="round"
97+
strokeLinejoin="round"
98+
strokeWidth={2}
99+
d="M9 5l7 7-7 7"
100+
/>
101+
</svg>
102+
</Link>
103+
))}
104+
</div>
105+
)}
106+
68107
{/* Call to action button - pushed to bottom */}
69108
<div className="mt-auto">
70109
<Link

components/icons/ProductIcons.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ import {
99
Clock,
1010
ArrowsOutCardinal,
1111
DiceSixIcon,
12+
ListBullets,
13+
Key,
14+
Play,
15+
BookOpen,
1216
} from "@phosphor-icons/react";
1317

1418
export function BarChartIcon() {
@@ -46,3 +50,19 @@ export function MultiChainIcon() {
4650
export function DiceIcon() {
4751
return <DiceSixIcon className="w-5 h-5" weight="regular" />;
4852
}
53+
54+
export function ListIcon() {
55+
return <ListBullets className="w-5 h-5" weight="regular" />;
56+
}
57+
58+
export function KeyIcon() {
59+
return <Key className="w-5 h-5" weight="regular" />;
60+
}
61+
62+
export function PlayIcon() {
63+
return <Play className="w-5 h-5" weight="regular" />;
64+
}
65+
66+
export function BookIcon() {
67+
return <BookOpen className="w-5 h-5" weight="regular" />;
68+
}

pages/price-feeds/_meta.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
"index": {
77
"title": "Introduction"
88
},
9-
"v3": {
10-
"title": "Pro Documentation",
9+
"pro": {
10+
"title": "Price Feeds Pro",
1111
"href": "/price-feeds/pro"
1212
},
13-
"v2": {
14-
"title": "Core Documentation",
13+
"core": {
14+
"title": "Price Feeds Core",
1515
"href": "/price-feeds/core"
1616
}
1717
}

pages/price-feeds/core/use-real-time-data/ton.mdx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,12 @@ Install the Pyth TON SDK and other necessary dependencies using npm:
1414

1515
<Tabs items={["npm", "yarn"]}>
1616
<Tabs.Tab>
17-
``` sh copy
18-
npm install @pythnetwork/pyth-ton-js @pythnetwork/hermes-client
19-
@ton/core @ton/ton @ton/crypto
20-
```
17+
``` sh copy npm install @pythnetwork/pyth-ton-js @pythnetwork/hermes-client
18+
@ton/core @ton/ton @ton/crypto ```
2119
</Tabs.Tab>
2220
<Tabs.Tab>
23-
```sh copy
24-
yarn add @pythnetwork/pyth-ton-js @pythnetwork/hermes-client
25-
@ton/core @ton/ton @ton/crypto
26-
```
21+
```sh copy yarn add @pythnetwork/pyth-ton-js @pythnetwork/hermes-client
22+
@ton/core @ton/ton @ton/crypto ```
2723
</Tabs.Tab>
2824
</Tabs>
2925

pages/price-feeds/index.mdx

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@ import {
66
MultiChainIcon,
77
ShieldIcon,
88
CodeIcon,
9+
ListIcon,
10+
KeyIcon,
11+
PlayIcon,
912
} from "../../components/icons/ProductIcons";
1013

11-
# Pyth Price Feeds
14+
# Price Feeds
1215

13-
Pyth Network provides real-time financial market data to smart contract applications on 100+ blockchains. Data is sourced from 120+ first-party providers including major exchanges and market makers.
16+
Pyth Price Feeds provides real-time financial market data to smart contract applications on 100+ blockchains. Data is sourced from 120+ first-party providers including major exchanges and market makers.
1417

15-
## Choose Your Version
18+
## Product Options
1619

1720
Pyth offers two main versions of price feeds, each optimized for different use cases:
1821

@@ -21,34 +24,54 @@ Pyth offers two main versions of price feeds, each optimized for different use c
2124
badge="Pro"
2225
badgeColor="bg-blue-600"
2326
icon={<LightningIcon />}
24-
title="Pyth Price Feeds Pro"
25-
description="Next-generation price feeds with ultra-low latency, equities and more."
27+
title="Price Feeds Pro"
28+
description={<>Next-generation price feeds with ultra-low latency, equities and more. <br /><strong>Previously known as Lazer.</strong></>}
2629
features={[
2730
{ icon: <LightningIcon />, text: "Ultra-low latency" },
2831
{ icon: <BarChartIcon />, text: "Equities & Indexes" },
2932
{ icon: <MultiChainIcon />, text: "100+ blockchains" },
3033
{ icon: <ShieldIcon />, text: "Real-time" }
3134
]}
35+
quickActions={[
36+
{ icon: <ListIcon />, title: "Available Feeds", href: "./price-feeds/pro/price-feed-ids" },
37+
{ icon: <KeyIcon />, title: "Get API Token", href: "./price-feeds/pro/getting-started" },
38+
{ icon: <PlayIcon />, title: "Quick Start", href: "./price-feeds/pro/getting-started" }
39+
]}
3240
ctaText="Explore Pro Documentation"
3341
href="./price-feeds/pro"
3442
/>
3543

3644
{" "}
3745

38-
{" "}
39-
4046
<ProductCard
4147
badge="Core"
4248
badgeColor="bg-green-600"
4349
icon={<BarChartIcon />}
44-
title="Pyth Price Feeds Core"
50+
title="Price Feeds Core"
4551
description="The original Pyth price feeds - stable, secure, and decentralized price data for broad DeFi applications."
4652
features={[
4753
{ icon: <ClockIcon />, text: "400ms update frequency" },
4854
{ icon: <BarChartIcon />, text: "2000+ price feeds" },
4955
{ icon: <MultiChainIcon />, text: "100+ blockchains" },
5056
{ icon: <ShieldIcon />, text: "Decentralized & secure" },
5157
]}
58+
quickActions={[
59+
{
60+
icon: <ListIcon />,
61+
title: "Available Feeds",
62+
href: "./price-feeds/core/price-feeds",
63+
},
64+
{
65+
icon: <PlayIcon />,
66+
title: "Quick Start",
67+
href: "./price-feeds/core/getting-started",
68+
},
69+
{
70+
icon: <CodeIcon />,
71+
title: "Integration Guide",
72+
href: "./price-feeds/core/getting-started",
73+
},
74+
]}
5275
ctaText="Explore Core Documentation"
5376
href="./price-feeds/core"
5477
/>

0 commit comments

Comments
 (0)