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)/_components/cart-link.tsxread-only · 6a45dae
// Enlace al carrito con el número de unidades, para la cabecera del sitio (Server Component).
import { cartLineCount, getCart } from '@/lib/cart';
import { cookieHeader, currentUserId } from '../_lib/store';
import Link from 'next/link';

export async function CartLink() {
  const cart = await getCart(await cookieHeader(), await currentUserId());
  const n = cart ? await cartLineCount(cart.id) : 0;
  return (
    <Link href="/cart" className="store-cart-link">
      Cart <span aria-label={`${n} items`}>({n})</span>
    </Link>
  );
}

Report @core/kit-store

Sign in with GitHub to report a package.