import { useState, memo } from 'react'; import Box from '@mui/material/Box'; import OutlinedInput from '@mui/material/OutlinedInput'; import InputLabel from '@mui/material/InputLabel'; import MenuItem from '@mui/material/MenuItem'; import FormControl from '@mui/material/FormControl'; import Select from '@mui/material/Select'; import Chip from '@mui/material/Chip'; function ChipSelect({ label, options, name }) { let start = (localStorage.getItem('apiCategories') || '').split(','); if (start[0] === '') { start = []; } const [optionsSelected, setoptionsSelected] = useState(start); const handleChange = (event) => { const { target: { value }, } = event; setoptionsSelected(typeof value === 'string' ? value.split(',') : value); localStorage.setItem('apiCategories', value); }; return (