Skip to content

Commit 676ee6c

Browse files
authored
Merge pull request #2509 from pyth-network/cprussin/ui-50-fix-loading-jankiness
wip: add nextjs loading state
2 parents b587b87 + 95eaca7 commit 676ee6c

File tree

95 files changed

+3755
-3126
lines changed

Some content is hidden

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

95 files changed

+3755
-3126
lines changed

apps/insights/next.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ const config = {
33

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

6+
experimental: {
7+
useCache: true,
8+
},
9+
610
logging: {
711
fetches: {
812
fullUrl: true,

apps/insights/src/app/layout.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
11
export { Root as default } from "../components/Root";
22
export { metadata, viewport } from "../metadata";
3-
4-
export const dynamic = "error";
5-
export const revalidate = 3600;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { ChartPageLoading as default } from "../../../../components/PriceFeed/chart-page";
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export { ChartPage as default } from "../../../../components/PriceFeed/chart-page";
2+
3+
export const revalidate = 3600;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { FeedCountBadge as default } from "../../../../components/PriceFeed/feed-count-badge";
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { PriceFeedHeader as default } from "../../../../components/PriceFeed/header";

apps/insights/src/app/price-feeds/[slug]/layout.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
import type { Metadata } from "next";
22
import { notFound } from "next/navigation";
3+
import type { ReactNode } from "react";
34

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

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

89
type Props = {
10+
feedCountBadge: ReactNode;
11+
header: ReactNode;
912
params: Promise<{
1013
slug: string;
1114
}>;
@@ -29,5 +32,4 @@ export const generateMetadata = async ({
2932
: notFound();
3033
};
3134

32-
export const dynamic = "error";
3335
export const revalidate = 3600;

apps/insights/src/app/price-feeds/[slug]/page.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { PublishersLoading as default } from "../../../../components/PriceFeed/publishers";
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
export { Publishers as default } from "../../../../components/PriceFeed/publishers";
22

3-
export const dynamic = "error";
43
export const revalidate = 3600;

0 commit comments

Comments
 (0)