(value: string)
| 135 | if (!variable) return null; |
| 136 | |
| 137 | const handleActiveSubset = (value: string) => { |
| 138 | // Return early if only one subset is selected and it is the current one |
| 139 | if (isActive.subsets.length === 1 && isActive.subsets.includes(value)) |
| 140 | return; |
| 141 | |
| 142 | setActive((prev) => { |
| 143 | if (prev.subsets.includes(value)) { |
| 144 | return { |
| 145 | ...prev, |
| 146 | subsets: prev.subsets.filter((subset) => subset !== value), |
| 147 | }; |
| 148 | } |
| 149 | |
| 150 | return { |
| 151 | ...prev, |
| 152 | subsets: [...prev.subsets, value], |
| 153 | }; |
| 154 | }); |
| 155 | }; |
| 156 | |
| 157 | const handleActiveDisplay = (value: string) => { |
| 158 | setActive((prev) => ({ |
nothing calls this directly
no outgoing calls
no test coverage detected