Dev Helpers
← Back

Free bin volume

Place this file at app/warehouse/page.tsx in an App Router project.

Open this example in the interactive library

Source code

// app/warehouse/page.tsx

export default function FreeBinVolume() {
  const bins = [
    { id: "A01", sku: "pen", qty: 12, limit: 20 },
    { id: "B04", sku: "pad", qty: 3, limit: 15 },
    { id: "A09", sku: "pen", qty: 5, limit: 10 },
  ];
  return (
    <ol>
      {bins.map((b) => (
        <li key={b.id}>
          {b.id}: {b.limit - b.qty} units free
        </li>
      ))}
    </ol>
  );
}