Skip to content
Open
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
6 changes: 3 additions & 3 deletions components/cart/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export async function addItem(

try {
await addToCart([{ merchandiseId: selectedVariantId, quantity: 1 }]);
revalidateTag(TAGS.cart);
revalidateTag(TAGS.cart, 'max');
} catch (e) {
return 'Error adding item to cart';
}
Expand All @@ -42,7 +42,7 @@ export async function removeItem(prevState: any, merchandiseId: string) {

if (lineItem && lineItem.id) {
await removeFromCart([lineItem.id]);
revalidateTag(TAGS.cart);
revalidateTag(TAGS.cart, 'max');
} else {
return 'Item not found in cart';
}
Expand Down Expand Up @@ -88,7 +88,7 @@ export async function updateItemQuantity(
await addToCart([{ merchandiseId, quantity }]);
}

revalidateTag(TAGS.cart);
revalidateTag(TAGS.cart, 'max');
} catch (e) {
console.error(e);
return 'Error updating item quantity';
Expand Down
4 changes: 2 additions & 2 deletions lib/shopify/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -490,11 +490,11 @@ export async function revalidate(req: NextRequest): Promise<NextResponse> {
}

if (isCollectionUpdate) {
revalidateTag(TAGS.collections);
revalidateTag(TAGS.collections, 'max');
}

if (isProductUpdate) {
revalidateTag(TAGS.products);
revalidateTag(TAGS.products, 'max');
}

return NextResponse.json({ status: 200, revalidated: true, now: Date.now() });
Expand Down
5 changes: 2 additions & 3 deletions next.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
export default {
experimental: {
ppr: true,
inlineCss: true,
useCache: true
cacheComponents: true,
inlineCss: true
},
images: {
formats: ['image/avif', 'image/webp'],
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"scripts": {
"dev": "next dev --turbopack",
"dev": "next dev",
"build": "next build",
"start": "next start",
"prettier": "prettier --write --ignore-unknown .",
Expand All @@ -13,7 +13,7 @@
"@heroicons/react": "^2.2.0",
"clsx": "^2.1.1",
"geist": "^1.3.1",
"next": "15.3.0-canary.13",
"next": "16.0.0-canary.3",
"react": "19.0.0",
"react-dom": "19.0.0",
"sonner": "^2.0.1"
Expand Down
Loading