Skip to content

Commit 42edc83

Browse files
committed
oops. add back ppr
1 parent 05e7833 commit 42edc83

File tree

6 files changed

+67
-63
lines changed

6 files changed

+67
-63
lines changed

examples/next-partial-prerendering/components/pricing.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { connection } from 'next/server';
12
import type { Product } from '#/types/product';
23
import { Ping } from '#/components/ping';
34
import { ProductEstimatedArrival } from '#/components/product-estimated-arrival';
@@ -13,6 +14,8 @@ import { cookies } from 'next/headers';
1314
import { getProduct } from '#/lib/products';
1415

1516
async function AddToCartFromCookies() {
17+
await connection();
18+
1619
// Get the cart count from the users cookies and pass it to the client
1720
// AddToCart component
1821
const cartCount = Number(cookies().get('_cart_count')?.value || '0');

examples/next-partial-prerendering/components/recommended-products.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
import { connection } from 'next/server';
12
import { Product } from '#/types/product';
23
import { ProductCard } from '#/components/product-card';
34
import { delayRecommendedProducts, withDelay } from '#/lib/delay';
45
import { getProducts } from '#/lib/products';
56

67
export async function RecommendedProducts() {
8+
await connection();
9+
710
let products: Product[] = await withDelay(
811
getProducts({ exclude: ['1'] }).then((res) => res.json()),
912
delayRecommendedProducts,

examples/next-partial-prerendering/components/reviews.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
import { connection } from 'next/server';
12
import type { Review } from '#/types/review';
23
import { ProductReviewCard } from '#/components/product-review-card';
34
import { delayReviews, withDelay } from '#/lib/delay';
45
import { getReviews } from '#/lib/reviews';
56

67
export async function Reviews() {
8+
await connection();
9+
710
let reviews: Review[] = await withDelay(
811
getReviews().then((res) => res.json()),
912
delayReviews,

examples/next-partial-prerendering/components/single-product.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
import { connection } from 'next/server';
12
import { Pricing } from '#/components/pricing';
23
import type { Product } from '#/types/product';
34
import { ProductRating } from '#/components/product-rating';
45
import Image from 'next/image';
56
import { getProduct } from '#/lib/products';
67

78
export async function SingleProduct() {
9+
await connection();
10+
811
const product: Product = await getProduct({ id: '1' }).then((res) =>
912
res.json(),
1013
);

examples/next-partial-prerendering/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"date-fns": "3.6.0",
1616
"dinero.js": "2.0.0-alpha.8",
1717
"geist": "1.3.1",
18-
"next": "15.0.0-canary.67",
18+
"next": "15.0.0-canary.174",
1919
"react": "19.0.0-rc-8b08e99e-20240713",
2020
"react-dom": "19.0.0-rc-8b08e99e-20240713"
2121
},

pnpm-lock.yaml

Lines changed: 54 additions & 62 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)