Simplify TaxonomySwitcher component
there are lots of TaxonomyDropdown internals being passed from TaxonomySwitcher component that can be handled inside the TaxonomyDropdown
- Fixes #31599 - Simplify TaxonomySwitcher
Move internals that depend on the taxonomy type into TaxonomyDropdown
instead of passing as a bunch of props.
- Refs #31599 - use useReducer hook to filter taxonomies
Instead of using two states and an effect to handle filtering, using a
reducer lets us calculate the filtered taxonomies directly
- Refs #31599 - use undefined to denote Any taxonomy scope
This is inline with what we do on the server side, removes the need to
do string comparisons and simplifies handling this case.
- Refs #31599 - ensure taxonomyType is organization or location