Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions apps/insights/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ const config = {

pageExtensions: ["ts", "tsx", "mdx"],

experimental: {
useCache: true,
},

logging: {
fetches: {
fullUrl: true,
Expand Down
3 changes: 0 additions & 3 deletions apps/insights/src/app/layout.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
export { Root as default } from "../components/Root";
export { metadata, viewport } from "../metadata";

export const dynamic = "error";
export const revalidate = 3600;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { ChartPageLoading as default } from "../../../../components/PriceFeed/chart-page";
3 changes: 3 additions & 0 deletions apps/insights/src/app/price-feeds/[slug]/(main)/page.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export { ChartPage as default } from "../../../../components/PriceFeed/chart-page";

export const revalidate = 3600;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { FeedCountBadge as default } from "../../../../components/PriceFeed/feed-count-badge";
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { PriceFeedHeader as default } from "../../../../components/PriceFeed/header";
4 changes: 3 additions & 1 deletion apps/insights/src/app/price-feeds/[slug]/layout.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import type { Metadata } from "next";
import { notFound } from "next/navigation";
import type { ReactNode } from "react";

import { Cluster, getFeeds } from "../../../services/pyth";

export { PriceFeedLayout as default } from "../../../components/PriceFeed/layout";

type Props = {
feedCountBadge: ReactNode;
header: ReactNode;
params: Promise<{
slug: string;
}>;
Expand All @@ -29,5 +32,4 @@ export const generateMetadata = async ({
: notFound();
};

export const dynamic = "error";
export const revalidate = 3600;
4 changes: 0 additions & 4 deletions apps/insights/src/app/price-feeds/[slug]/page.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { PublishersLoading as default } from "../../../../components/PriceFeed/publishers";
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export { Publishers as default } from "../../../../components/PriceFeed/publishers";

export const dynamic = "error";
export const revalidate = 3600;
11 changes: 0 additions & 11 deletions apps/insights/src/app/price-feeds/layout.ts

This file was deleted.

11 changes: 10 additions & 1 deletion apps/insights/src/app/price-feeds/page.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
import type { Metadata } from "next";

export { PriceFeeds as default } from "../../components/PriceFeeds";

export const dynamic = "error";
export const revalidate = 3600;

export const metadata: Metadata = {
title: {
default: "Price Feeds",
template: "%s | Price Feeds | Pyth Network Insights",
},
description: "Explore market data on the Pyth network.",
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { PerformanceLoading as default } from "../../../../../components/Publisher/performance";
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export { Performance as default } from "../../../../../components/Publisher/performance";

export const revalidate = 3600;
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { lookup } from "@pythnetwork/known-publishers";
import type { Metadata } from "next";

export { PublishersLayout as default } from "../../../../components/Publisher/layout";
export { PublisherLayout as default } from "../../../../components/Publisher/layout";

type Props = {
params: Promise<{
Expand All @@ -22,5 +22,4 @@ export const generateMetadata = async ({
};
};

export const dynamic = "error";
export const revalidate = 3600;
4 changes: 0 additions & 4 deletions apps/insights/src/app/publishers/[cluster]/[key]/page.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { PriceFeedsLoading as default } from "../../../../../components/Publisher/price-feeds";
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export { PriceFeeds as default } from "../../../../../components/Publisher/price-feeds";

export const dynamic = "error";
export const revalidate = 3600;
11 changes: 0 additions & 11 deletions apps/insights/src/app/publishers/layout.ts

This file was deleted.

10 changes: 9 additions & 1 deletion apps/insights/src/app/publishers/page.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import type { Metadata } from "next";
export { Publishers as default } from "../../components/Publishers";

export const dynamic = "error";
export const revalidate = 3600;

export const metadata: Metadata = {
title: {
default: "Publishers",
template: "%s | Publishers | Pyth Network Insights",
},
description: "Explore publishers who contribute to the Pyth network.",
};
12 changes: 12 additions & 0 deletions apps/insights/src/components/AssetClassBadge/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Badge } from "@pythnetwork/component-library/Badge";
import type { ComponentProps } from "react";

type Props = Omit<ComponentProps<typeof Badge>, "children"> & {
children: string;
};

export const AssetClassBadge = ({ children, ...props }: Props) => (
<Badge variant="neutral" style="outline" size="xs" {...props}>
{children.toUpperCase()}
</Badge>
);
29 changes: 0 additions & 29 deletions apps/insights/src/components/AssetClassTag/index.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion apps/insights/src/components/EntityList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const EntityList = <T extends string>({
{...props}
>
{isLoading ? (
<GridListItem className={styles.entityItem ?? ""}>
<GridListItem className={styles.entityItem ?? ""} textValue="Loading">
<div className={styles.itemHeader}>{headerLoadingSkeleton}</div>
<dl className={styles.itemDetails}>
{fields.map((field) => (
Expand Down
36 changes: 16 additions & 20 deletions apps/insights/src/components/Explain/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Info } from "@phosphor-icons/react/dist/ssr/Info";
import { Lightbulb } from "@phosphor-icons/react/dist/ssr/Lightbulb";
import { Alert, AlertTrigger } from "@pythnetwork/component-library/Alert";
import { Button } from "@pythnetwork/component-library/Button";
import type { ComponentProps, ReactNode } from "react";

Expand All @@ -14,24 +13,21 @@ type Props = {

export const Explain = ({ size, title, children }: Props) => (
<div className={styles.explain}>
<AlertTrigger>
<Button
className={styles.trigger ?? ""}
variant="ghost"
size={size}
beforeIcon={(props) => <Info weight="fill" {...props} />}
rounded
hideText
>
Explain {title}
</Button>
<Alert
title={title}
icon={<Lightbulb />}
bodyClassName={styles.description}
>
{children}
</Alert>
</AlertTrigger>
<Button
className={styles.trigger ?? ""}
variant="ghost"
size={size}
beforeIcon={(props) => <Info weight="fill" {...props} />}
rounded
hideText
alert={{
title,
icon: <Lightbulb />,
bodyClassName: styles.description,
contents: children,
}}
>
Explain {title}
</Button>
</div>
);
91 changes: 0 additions & 91 deletions apps/insights/src/components/LayoutTransition/index.tsx

This file was deleted.

Loading
Loading