fix: es_419 locale, run prettier, remove unused line

This commit is contained in:
David Ralph
2022-11-26 21:32:50 +00:00
committed by GitHub
parent 8035b35436
commit e161b82ad3
16 changed files with 65 additions and 54 deletions

View File

@@ -9,22 +9,19 @@ 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 = [];
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)
setoptionsSelected(typeof value === 'string' ? value.split(',') : value);
localStorage.setItem('apiCategories', value);
};
return (
<div>
<FormControl>