import { For, Show, createMemo } from "solid-js" import type { InvoiceItem } from "@/lib/api" import { formatUsd } from "@/lib/format" const MAX_VISIBLE_ITEMS = 8 // Presentational "On this invoice" line-items block. The createResource that // fetches items stays in PaymentDialog; this only renders the parsed list. Props // are reactive only when read lazily, so access props.* inside JSX/derivations. type InvoiceItemsListProps = { items: InvoiceItem[] } export default function InvoiceItemsList(props: InvoiceItemsListProps) { const visibleItems = createMemo(() => props.items.slice(0, MAX_VISIBLE_ITEMS)) return (

On this invoice

) }