Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setSelectedEffect(null);
}
}}
>
<select> {
const selectedOption = event.target[event.target.selectedIndex];
const id = selectedOption.getAttribute('data-id');
const type = selectedOption.getAttribute('data-type');
setSelectedEffect({ id, type });
}}
>
<option>None</option>
{constants.effects.map((effect, i) => {
const id = `${effect.id}-${i}`;
return (
<option id="==" selected="{selectedEffect" data-type="{effect.id}" data-id="{id}">
{effect.name}
</option>
);
})}
</select>{' '}
<button type="submit">Add Effect</button>