Skip to content

Commit

Permalink
Correct this type.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbillion committed Aug 11, 2024
1 parent 946def3 commit 3552fac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hooks/use-primary-term/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useSelect } from '@wordpress/data';
import { __ } from '@wordpress/i18n';
import { store as coreStore } from '@wordpress/core-data';
import type { WP_REST_API_Taxonomy } from 'wp-types';
import type { WP_REST_API_Term } from 'wp-types';
import { usePost } from '../use-post';
import { useIsPluginActive } from '../use-is-plugin-active';
import { useIsSupportedTaxonomy } from '../use-is-supported-taxonomy';
Expand Down Expand Up @@ -64,7 +64,7 @@ export const usePrimaryTerm = (taxonomyName: string) => {
}

const { getEntityRecord } = select(coreStore);
return getEntityRecord<WP_REST_API_Taxonomy>('taxonomy', taxonomyName, primaryTermId);
return getEntityRecord<WP_REST_API_Term>('taxonomy', taxonomyName, primaryTermId);
},
[primaryTermId],
);
Expand Down

0 comments on commit 3552fac

Please sign in to comment.