(value: string)
| 75 | if (!variable) return null; |
| 76 | |
| 77 | const handleActiveSubset = (value: string) => { |
| 78 | // Return early if only one subset is selected and it is the current one |
| 79 | if (isActive.subsets.length === 1 && isActive.subsets.includes(value)) |
| 80 | return; |
| 81 | |
| 82 | setActive((prev) => { |
| 83 | if (prev.subsets.includes(value)) { |
| 84 | return { |
| 85 | ...prev, |
| 86 | subsets: prev.subsets.filter((subset) => subset !== value), |
| 87 | }; |
| 88 | } |
| 89 | |
| 90 | return { |
| 91 | ...prev, |
| 92 | subsets: [...prev.subsets, value], |
| 93 | }; |
| 94 | }); |
| 95 | }; |
| 96 | |
| 97 | const handleActiveDisplay = (value: string) => { |
| 98 | setActive((prev) => ({ |
nothing calls this directly
no outgoing calls
no test coverage detected