EN

@core / kit-store

1.0.1 ▾
verifiedMIT
GitHub

Online store kit for Next.js: catalog, cart, Stripe checkout, orders, shipping, coupons, verified reviews, accounts

Code27 filesContext~1K tokensscan passed

The exact tree that will be injected, after .genpmignore. Pinned to

src/app/(store)/orders/[number]/page.tsxread-only · 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>
  );
}

Report @core/kit-store

Sign in with GitHub to report a package.