import { PanelBody, PanelRow } from '@wordpress/components' import classNames from 'classnames' import { useTemplatesStore } from '@library/state/Templates' import { getTaxonomyName } from '@library/util/general' const SingleTaxItem = ({ active, tax, update }) => { return (
  • ) } export const TaxonomySection = ({ taxType, taxonomies, taxLabel }) => { const searchParams = useTemplatesStore((state) => state.searchParams) const updateTaxonomies = useTemplatesStore( (state) => state.updateTaxonomies, ) if (!taxonomies?.length > 0) return null return (
      {taxonomies.map((tax) => { const update = () => updateTaxonomies({ [taxType]: tax }) const isCurrentTax = searchParams?.taxonomies[taxType]?.slug === tax?.slug return ( ) })}
    ) }