Fix: Clean up needed items display in RSVPForm

This commit is contained in:
2025-04-30 09:01:21 -04:00
parent bbe5ad16ca
commit db4df2885c

View File

@@ -232,17 +232,8 @@ const RSVPForm: React.FC = () => {
onChange={handleItemsChange}
input={<OutlinedInput label="What items are you bringing?" />}
renderValue={(selected) => {
const items = Array.isArray(selected) ? selected : [];
if (items.length === 0) return null;
return (
<Box sx={{ display: 'flex', flexWrap: 'wrap', gap: 0.5 }}>
{items.map((value) => (
<Typography key={value} variant="body2">
{value}
</Typography>
))}
</Box>
);
if (!Array.isArray(selected) || selected.length === 0) return '';
return selected.join(', ');
}}
>
{neededItems.map((item) => (