import React, { useState } from 'react'; import { Item } from '../types'; import { ItemIcon } from './IconSet'; interface InventoryGridProps { items: (Item | null)[]; } const InventoryGrid: React.FC = ({ items }) => { return (

Inventar

{items.filter(i => i !== null).length} / {items.length} Plätze
{items.map((item, index) => (
{item ? ( <>
{/* Count Badge */} {item.count > 1 && ( {item.count} )} {/* Tooltip */}
{item.name}
{item.nbtSummary && (
{item.nbtSummary}
)}
) : ( // Empty slot styling
)}
))}
); }; export default InventoryGrid;