JA
ベータ版の翻訳

@core / kit-store

1.0.1 ▾
認証済みMIT
GitHub

Next.js 向けオンラインストアキット:カタログ、カート、Stripe 決済、注文、配送、クーポン、レビュー、アカウント

コード27 ファイルコンテキスト約 1024 トークンスキャン合格

.genpmignore 適用後に組み込まれる正確なツリーです。固定先:

src/app/(store)/orders/[number]/page.tsx読み取り専用 · 6a45dae
// Pedido de cliente: accesible para su dueño con sesión o con el enlace firmado del email (`?token=`).
import type { Metadata } from 'next';
import { notFound } from 'next/navigation';
import { getOrderForCustomer } from '@/lib/orders';
import { OrderSummary } from '../../_components/order-summary';
import '../../_components/store.css';
import { currentUserId, one } from '../../_lib/store';

export const dynamic = 'force-dynamic';
export const metadata: Metadata = { title: 'Your order', robots: { index: false, follow: false } };

export default async function OrderPage({ params, searchParams }: { params: Promise<{ number: string }>; searchParams: Promise<Record<string, string | string[] | undefined>> }) {
  const { number } = await params;
  const order = await getOrderForCustomer(number, { userId: await currentUserId(), token: one((await searchParams).token) ?? null });
  if (!order) notFound(); // también si existe pero no es tuyo
  return (
    <main className="blk store">
      <OrderSummary order={order} />
    </main>
  );
}

@core/kit-store を報告

パッケージを報告するには GitHub でログインしてください。

GitHub で続ける