Skip to content

Commit b968742

Browse files
committed
feat(insights): build header & tabs for price feed details page
1 parent 6b611c8 commit b968742

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+3746
-3295
lines changed

apps/api-reference/jsx.d.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* This file only exists because in react 19, the JSX namespace was moved under
3+
* the React export. However, some libraries (e.g. react-markdown) still have
4+
* some things typed as `JSX.<Something>`. Until those libraries update to
5+
* import the namespace correctly, we'll need this declaration file in place to
6+
* expose JSX via the old global location.
7+
*/
8+
9+
import type { JSX as Jsx } from "react/jsx-runtime";
10+
11+
declare global {
12+
namespace JSX {
13+
type ElementClass = Jsx.ElementClass;
14+
type Element = Jsx.Element;
15+
type IntrinsicElements = Jsx.IntrinsicElements;
16+
}
17+
}

apps/api-reference/next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
/// <reference types="next/image-types/global" />
33

44
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
5+
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

apps/api-reference/src/markdown-components.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ export const MARKDOWN_COMPONENTS = {
3131
</Code>
3232
);
3333
} else {
34-
// @ts-expect-error react-markdown doesn't officially support react 19
35-
// yet; there's no issues here in practice but the types don't currently
36-
// unify
3734
return <pre {...props} />;
3835
}
3936
},

apps/insights/next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
/// <reference types="next/image-types/global" />
33

44
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
5+
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

apps/insights/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"clsx": "catalog:",
3636
"cryptocurrency-icons": "catalog:",
3737
"dnum": "catalog:",
38-
"framer-motion": "catalog:",
38+
"motion": "catalog:",
3939
"next": "catalog:",
4040
"next-themes": "catalog:",
4141
"nuqs": "catalog:",
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import type { Metadata } from "next";
2+
3+
import { client } from "../../../services/pyth";
4+
export { PriceFeedLayout as default } from "../../../components/PriceFeed/layout";
5+
6+
export const metadata: Metadata = {
7+
title: "Price Feeds",
8+
};
9+
10+
export const generateStaticParams = async () => {
11+
const data = await client.getData();
12+
return data.symbols.map((symbol) => ({ slug: encodeURIComponent(symbol) }));
13+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { Chart as default } from "../../../components/PriceFeed/chart";
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { PriceComponents as default } from "../../../../components/PriceFeed/price-components";
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { PriceFeedsLayout as default } from "../../components/PriceFeeds/layout";
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1+
import type { Metadata } from "next";
2+
13
export { PriceFeeds as default } from "../../components/PriceFeeds";
4+
5+
export const metadata: Metadata = {
6+
title: "Price Feeds",
7+
};

0 commit comments

Comments
 (0)