mirror of
https://github.com/vercel/commerce.git
synced 2025-06-04 23:36:58 +00:00
Merge e36bcfd58a13e904d44d171cdd596058ca5ebad9 into 7e9e19d692f0a65e9389d9c11243deb92639c305
This commit is contained in:
commit
a432e40bad
5
app/[page]/loading.tsx
Normal file
5
app/[page]/loading.tsx
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
export default function Loading() {
|
||||||
|
// Provide a proper skeleton here if the params are high cardinality, and
|
||||||
|
// fallback shells are preferred over route shells.
|
||||||
|
return null;
|
||||||
|
}
|
5
app/product/[handle]/loading.tsx
Normal file
5
app/product/[handle]/loading.tsx
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
export default function Loading() {
|
||||||
|
// Provide a proper skeleton here if the params are high cardinality, and
|
||||||
|
// fallback shells are preferred over route shells.
|
||||||
|
return null;
|
||||||
|
}
|
@ -27,8 +27,6 @@ export default async function CategoryPage(props: {
|
|||||||
params: Promise<{ collection: string }>;
|
params: Promise<{ collection: string }>;
|
||||||
searchParams?: Promise<{ [key: string]: string | string[] | undefined }>;
|
searchParams?: Promise<{ [key: string]: string | string[] | undefined }>;
|
||||||
}) {
|
}) {
|
||||||
'use cache';
|
|
||||||
|
|
||||||
const searchParams = await props.searchParams;
|
const searchParams = await props.searchParams;
|
||||||
const params = await props.params;
|
const params = await props.params;
|
||||||
const { sort } = searchParams as { [key: string]: string };
|
const { sort } = searchParams as { [key: string]: string };
|
||||||
|
@ -53,7 +53,9 @@ export async function Navbar() {
|
|||||||
</Suspense>
|
</Suspense>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex justify-end md:w-1/3">
|
<div className="flex justify-end md:w-1/3">
|
||||||
<CartModal />
|
<Suspense>
|
||||||
|
<CartModal />
|
||||||
|
</Suspense>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
@ -1,12 +1,20 @@
|
|||||||
import { ImageResponse } from 'next/og';
|
|
||||||
import LogoIcon from './icons/logo';
|
|
||||||
import { join } from 'path';
|
|
||||||
import { readFile } from 'fs/promises';
|
import { readFile } from 'fs/promises';
|
||||||
|
import { ImageResponse } from 'next/og';
|
||||||
|
import { join } from 'path';
|
||||||
|
import LogoIcon from './icons/logo';
|
||||||
|
|
||||||
export type Props = {
|
export type Props = {
|
||||||
title?: string;
|
title?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
async function getFont() {
|
||||||
|
'use cache';
|
||||||
|
|
||||||
|
const file = await readFile(join(process.cwd(), './fonts/Inter-Bold.ttf'));
|
||||||
|
|
||||||
|
return Uint8Array.from(file).buffer;
|
||||||
|
}
|
||||||
|
|
||||||
export default async function OpengraphImage(
|
export default async function OpengraphImage(
|
||||||
props?: Props
|
props?: Props
|
||||||
): Promise<ImageResponse> {
|
): Promise<ImageResponse> {
|
||||||
@ -17,8 +25,7 @@ export default async function OpengraphImage(
|
|||||||
...props
|
...props
|
||||||
};
|
};
|
||||||
|
|
||||||
const file = await readFile(join(process.cwd(), './fonts/Inter-Bold.ttf'));
|
const font = await getFont();
|
||||||
const font = Uint8Array.from(file).buffer;
|
|
||||||
|
|
||||||
return new ImageResponse(
|
return new ImageResponse(
|
||||||
(
|
(
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
export default {
|
import { NextConfig } from 'next';
|
||||||
|
|
||||||
|
const nextConfig: NextConfig = {
|
||||||
experimental: {
|
experimental: {
|
||||||
ppr: true,
|
ppr: true,
|
||||||
dynamicIO: true,
|
dynamicIO: true,
|
||||||
inlineCss: true,
|
inlineCss: true,
|
||||||
useCache: true
|
useCache: true,
|
||||||
|
prerenderEarlyExit: false
|
||||||
},
|
},
|
||||||
images: {
|
images: {
|
||||||
formats: ['image/avif', 'image/webp'],
|
formats: ['image/avif', 'image/webp'],
|
||||||
@ -16,3 +19,5 @@ export default {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export default nextConfig;
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
"@heroicons/react": "^2.2.0",
|
"@heroicons/react": "^2.2.0",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
"geist": "^1.4.2",
|
"geist": "^1.4.2",
|
||||||
"next": "15.4.0-canary.31",
|
"next": "https://vercel-packages.vercel.app/next/commits/3de4e9a1bd5755f8b69035716a69d444672306e8/next",
|
||||||
"react": "19.1.0",
|
"react": "19.1.0",
|
||||||
"react-dom": "19.1.0",
|
"react-dom": "19.1.0",
|
||||||
"sonner": "^2.0.3"
|
"sonner": "^2.0.3"
|
||||||
@ -30,5 +30,6 @@
|
|||||||
"prettier-plugin-tailwindcss": "^0.6.11",
|
"prettier-plugin-tailwindcss": "^0.6.11",
|
||||||
"tailwindcss": "^4.1.6",
|
"tailwindcss": "^4.1.6",
|
||||||
"typescript": "5.8.3"
|
"typescript": "5.8.3"
|
||||||
}
|
},
|
||||||
|
"packageManager": "pnpm@9.15.4+sha512.b2dc20e2fc72b3e18848459b37359a32064663e5627a51e4c74b2c29dd8e8e0491483c3abb40789cfd578bf362fb6ba8261b05f0387d76792ed6e23ea3b1b6a0"
|
||||||
}
|
}
|
||||||
|
107
pnpm-lock.yaml
generated
107
pnpm-lock.yaml
generated
@ -19,10 +19,10 @@ importers:
|
|||||||
version: 2.1.1
|
version: 2.1.1
|
||||||
geist:
|
geist:
|
||||||
specifier: ^1.4.2
|
specifier: ^1.4.2
|
||||||
version: 1.4.2(next@15.4.0-canary.31(react-dom@19.1.0(react@19.1.0))(react@19.1.0))
|
version: 1.4.2(next@https://vercel-packages.vercel.app/next/commits/3de4e9a1bd5755f8b69035716a69d444672306e8/next(react-dom@19.1.0(react@19.1.0))(react@19.1.0))
|
||||||
next:
|
next:
|
||||||
specifier: 15.4.0-canary.31
|
specifier: https://vercel-packages.vercel.app/next/commits/3de4e9a1bd5755f8b69035716a69d444672306e8/next
|
||||||
version: 15.4.0-canary.31(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
version: https://vercel-packages.vercel.app/next/commits/3de4e9a1bd5755f8b69035716a69d444672306e8/next(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||||
react:
|
react:
|
||||||
specifier: 19.1.0
|
specifier: 19.1.0
|
||||||
version: 19.1.0
|
version: 19.1.0
|
||||||
@ -245,57 +245,16 @@ packages:
|
|||||||
'@jridgewell/trace-mapping@0.3.25':
|
'@jridgewell/trace-mapping@0.3.25':
|
||||||
resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==}
|
resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==}
|
||||||
|
|
||||||
'@next/env@15.4.0-canary.31':
|
'@next/env@https://vercel-packages.vercel.app/next/prs/78882/@next/env':
|
||||||
resolution: {integrity: sha512-v9qjCjWhJOcBKVLzsx00JlraSFJPd4XwY5qaIaIfslpWS7qtWrwU01IOSLGBkM+JwAa/VWoVeT5p/dqqbuJgKw==}
|
resolution: {tarball: https://vercel-packages.vercel.app/next/prs/78882/@next/env}
|
||||||
|
version: 15.4.0-preview-736271a9-20250512
|
||||||
|
|
||||||
'@next/swc-darwin-arm64@15.4.0-canary.31':
|
'@next/swc-linux-x64-gnu@https://vercel-packages.vercel.app/next/prs/78882/@next/swc-linux-x64-gnu':
|
||||||
resolution: {integrity: sha512-zBo+HeZm3IVlwHGPQpTBfdlYQrcQ4PHkuhL4/s/drVaYrFccL5bf5px2xNL3s6gje+RQm7AnJeJdWK7dXcF1LQ==}
|
resolution: {tarball: https://vercel-packages.vercel.app/next/prs/78882/@next/swc-linux-x64-gnu}
|
||||||
|
version: 15.4.0-preview-736271a9-20250512
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [arm64]
|
|
||||||
os: [darwin]
|
|
||||||
|
|
||||||
'@next/swc-darwin-x64@15.4.0-canary.31':
|
|
||||||
resolution: {integrity: sha512-GxZK9xddHRJB4oXmxd0gY+EKpmeW2ioA8b0fmsVrFgaLD+BlKol4z+6UgjtlaVkxXGX8gqd4kvoZ6jNKkGKfNw==}
|
|
||||||
engines: {node: '>= 10'}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [darwin]
|
|
||||||
|
|
||||||
'@next/swc-linux-arm64-gnu@15.4.0-canary.31':
|
|
||||||
resolution: {integrity: sha512-8ZJUYhpc3uOXCm8c38qRCW5OdRgLczMxhyMITUpbQrYZ+csncvaTkeAjUEZ0OyZqrq+5LqSs3qbaZZrd8wQMYw==}
|
|
||||||
engines: {node: '>= 10'}
|
|
||||||
cpu: [arm64]
|
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@next/swc-linux-arm64-musl@15.4.0-canary.31':
|
|
||||||
resolution: {integrity: sha512-vylmxjjBjA+uwH4ZO1Mkv7OKH3cXAWgZp1sBRMTClBbKyMcU/WgV3DPhjP3t+gsYYqaFpTJg87JVPbha0uzlqQ==}
|
|
||||||
engines: {node: '>= 10'}
|
|
||||||
cpu: [arm64]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@next/swc-linux-x64-gnu@15.4.0-canary.31':
|
|
||||||
resolution: {integrity: sha512-Yakxjs+uzfwTy5HbSa8NPKNbw8pad+p7T86p52/+7eFZab0QoPAI1v1dkscvz2D5+luQLHRZPS9Dgxljv/cgvA==}
|
|
||||||
engines: {node: '>= 10'}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@next/swc-linux-x64-musl@15.4.0-canary.31':
|
|
||||||
resolution: {integrity: sha512-spC49gdMMtMeAb9dd8sec14cqckiOWFgyi5uv5UvyvK8EQhTX0oDpPBmzODlesasIbx0rQRYYMs8KP9msFmTPA==}
|
|
||||||
engines: {node: '>= 10'}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@next/swc-win32-arm64-msvc@15.4.0-canary.31':
|
|
||||||
resolution: {integrity: sha512-Np5g/RJDHHxn15mg7mkAqhwaPG/H3uYbaO6RGxLjoKy2NJzivZ+a53r6BhhgvYywTgU18syUqgmLxxmz+hjysw==}
|
|
||||||
engines: {node: '>= 10'}
|
|
||||||
cpu: [arm64]
|
|
||||||
os: [win32]
|
|
||||||
|
|
||||||
'@next/swc-win32-x64-msvc@15.4.0-canary.31':
|
|
||||||
resolution: {integrity: sha512-0/4BgXFG9N/YT+pHN1XvPB5JJTyJKrTUNvZPdCN7knnonXwuhoOwqmK/xI3rGLbHHTe0UFGcsXzh1NeRjRyjUw==}
|
|
||||||
engines: {node: '>= 10'}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [win32]
|
|
||||||
|
|
||||||
'@react-aria/focus@3.20.2':
|
'@react-aria/focus@3.20.2':
|
||||||
resolution: {integrity: sha512-Q3rouk/rzoF/3TuH6FzoAIKrl+kzZi9LHmr8S5EqLAOyP9TXIKG34x2j42dZsAhrw7TbF9gA8tBKwnCNH4ZV+Q==}
|
resolution: {integrity: sha512-Q3rouk/rzoF/3TuH6FzoAIKrl+kzZi9LHmr8S5EqLAOyP9TXIKG34x2j42dZsAhrw7TbF9gA8tBKwnCNH4ZV+Q==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@ -503,6 +462,7 @@ packages:
|
|||||||
|
|
||||||
geist@1.4.2:
|
geist@1.4.2:
|
||||||
resolution: {integrity: sha512-OQUga/KUc8ueijck6EbtT07L4tZ5+TZgjw8PyWfxo16sL5FWk7gNViPNU8hgCFjy6bJi9yuTP+CRpywzaGN8zw==}
|
resolution: {integrity: sha512-OQUga/KUc8ueijck6EbtT07L4tZ5+TZgjw8PyWfxo16sL5FWk7gNViPNU8hgCFjy6bJi9yuTP+CRpywzaGN8zw==}
|
||||||
|
version: 1.4.2
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
next: '>=13.2.0'
|
next: '>=13.2.0'
|
||||||
|
|
||||||
@ -610,8 +570,9 @@ packages:
|
|||||||
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
|
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
next@15.4.0-canary.31:
|
next@https://vercel-packages.vercel.app/next/commits/3de4e9a1bd5755f8b69035716a69d444672306e8/next:
|
||||||
resolution: {integrity: sha512-w3PUyFAfICyamYgvS2ZZqK8rSSyI97FFoVH5S9E/QABs4LLF50JyhsJwVZD7cADpMsBqBKaVes6OYltBxP8eIw==}
|
resolution: {tarball: https://vercel-packages.vercel.app/next/commits/3de4e9a1bd5755f8b69035716a69d444672306e8/next}
|
||||||
|
version: 15.4.0-preview-736271a9-20250512
|
||||||
engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0}
|
engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@ -942,30 +903,9 @@ snapshots:
|
|||||||
'@jridgewell/resolve-uri': 3.1.2
|
'@jridgewell/resolve-uri': 3.1.2
|
||||||
'@jridgewell/sourcemap-codec': 1.5.0
|
'@jridgewell/sourcemap-codec': 1.5.0
|
||||||
|
|
||||||
'@next/env@15.4.0-canary.31': {}
|
'@next/env@https://vercel-packages.vercel.app/next/prs/78882/@next/env': {}
|
||||||
|
|
||||||
'@next/swc-darwin-arm64@15.4.0-canary.31':
|
'@next/swc-linux-x64-gnu@https://vercel-packages.vercel.app/next/prs/78882/@next/swc-linux-x64-gnu':
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@next/swc-darwin-x64@15.4.0-canary.31':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@next/swc-linux-arm64-gnu@15.4.0-canary.31':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@next/swc-linux-arm64-musl@15.4.0-canary.31':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@next/swc-linux-x64-gnu@15.4.0-canary.31':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@next/swc-linux-x64-musl@15.4.0-canary.31':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@next/swc-win32-arm64-msvc@15.4.0-canary.31':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@next/swc-win32-x64-msvc@15.4.0-canary.31':
|
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@react-aria/focus@3.20.2(react-dom@19.1.0(react@19.1.0))(react@19.1.0)':
|
'@react-aria/focus@3.20.2(react-dom@19.1.0(react@19.1.0))(react@19.1.0)':
|
||||||
@ -1168,9 +1108,9 @@ snapshots:
|
|||||||
graceful-fs: 4.2.11
|
graceful-fs: 4.2.11
|
||||||
tapable: 2.2.1
|
tapable: 2.2.1
|
||||||
|
|
||||||
geist@1.4.2(next@15.4.0-canary.31(react-dom@19.1.0(react@19.1.0))(react@19.1.0)):
|
geist@1.4.2(next@https://vercel-packages.vercel.app/next/commits/3de4e9a1bd5755f8b69035716a69d444672306e8/next(react-dom@19.1.0(react@19.1.0))(react@19.1.0)):
|
||||||
dependencies:
|
dependencies:
|
||||||
next: 15.4.0-canary.31(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
next: https://vercel-packages.vercel.app/next/commits/3de4e9a1bd5755f8b69035716a69d444672306e8/next(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||||
|
|
||||||
graceful-fs@4.2.11: {}
|
graceful-fs@4.2.11: {}
|
||||||
|
|
||||||
@ -1244,9 +1184,9 @@ snapshots:
|
|||||||
|
|
||||||
nanoid@3.3.11: {}
|
nanoid@3.3.11: {}
|
||||||
|
|
||||||
next@15.4.0-canary.31(react-dom@19.1.0(react@19.1.0))(react@19.1.0):
|
next@https://vercel-packages.vercel.app/next/commits/3de4e9a1bd5755f8b69035716a69d444672306e8/next(react-dom@19.1.0(react@19.1.0))(react@19.1.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@next/env': 15.4.0-canary.31
|
'@next/env': https://vercel-packages.vercel.app/next/prs/78882/@next/env
|
||||||
'@swc/helpers': 0.5.15
|
'@swc/helpers': 0.5.15
|
||||||
caniuse-lite: 1.0.30001717
|
caniuse-lite: 1.0.30001717
|
||||||
postcss: 8.4.31
|
postcss: 8.4.31
|
||||||
@ -1254,14 +1194,7 @@ snapshots:
|
|||||||
react-dom: 19.1.0(react@19.1.0)
|
react-dom: 19.1.0(react@19.1.0)
|
||||||
styled-jsx: 5.1.6(react@19.1.0)
|
styled-jsx: 5.1.6(react@19.1.0)
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@next/swc-darwin-arm64': 15.4.0-canary.31
|
'@next/swc-linux-x64-gnu': https://vercel-packages.vercel.app/next/prs/78882/@next/swc-linux-x64-gnu
|
||||||
'@next/swc-darwin-x64': 15.4.0-canary.31
|
|
||||||
'@next/swc-linux-arm64-gnu': 15.4.0-canary.31
|
|
||||||
'@next/swc-linux-arm64-musl': 15.4.0-canary.31
|
|
||||||
'@next/swc-linux-x64-gnu': 15.4.0-canary.31
|
|
||||||
'@next/swc-linux-x64-musl': 15.4.0-canary.31
|
|
||||||
'@next/swc-win32-arm64-msvc': 15.4.0-canary.31
|
|
||||||
'@next/swc-win32-x64-msvc': 15.4.0-canary.31
|
|
||||||
sharp: 0.34.1
|
sharp: 0.34.1
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@babel/core'
|
- '@babel/core'
|
||||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Loading…
x
Reference in New Issue
Block a user