'How can I checked only one checkebox at a time. when clicked one other will be unchecked

enter image description herehere is my code

const handleCheckBox = (e) => {
    const { value, checked } = e.target;
    if (checked) {
      setFilter((filter) => [...filter, value]);
    } else {
      setFilter((filter) => filter.filter((el) => el !== value));
    }
  };

I want to select one checked box at a time. others will be unchecked when I checked one. Please check out the image.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source