Added missing prop to useActionState example (#8308)

* added missing prop to useactionstate example

* remove pending from total in first example
This commit is contained in:
Jake Saterlay
2026-02-17 00:09:12 +00:00
committed by GitHub
parent 55a317d407
commit a1cc2ab4bf

View File

@@ -177,7 +177,7 @@ export default function Checkout() {
<button onClick={handleClick}>Add Ticket{isPending ? ' 🌀' : ' '}</button>
</div>
<hr />
<Total quantity={count} />
<Total quantity={count} />
</div>
);
}
@@ -190,11 +190,11 @@ const formatter = new Intl.NumberFormat('en-US', {
minimumFractionDigits: 0,
});
export default function Total({quantity, isPending}) {
export default function Total({quantity}) {
return (
<div className="row total">
<span>Total</span>
<span>{isPending ? '🌀 Updating...' : formatter.format(quantity * 9999)}</span>
<span>{formatter.format(quantity * 9999)}</span>
</div>
);
}