Skip to content

Commit

Permalink
fix documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidsector9 committed Jul 14, 2024
1 parent fb3028b commit d0bf34a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions assets/js/gutenberg-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,12 @@ const DistributorIcon = () => (
* Add the Distributor panel to Gutenberg
*/
const DistributorPlugin = () => {
// eslint-disable-next-line no-shadow, react-hooks/rules-of-hooks -- permission checks are needed.
// eslint-disable-next-line no-shadow
const postType = useSelect( ( select ) =>
select( 'core/editor' ).getCurrentPostType()
);

// eslint-disable-next-line no-shadow -- permission checks are needed.
// eslint-disable-next-line no-shadow
const postStatus = useSelect( ( select ) =>
select( 'core/editor' ).getCurrentPostAttribute( 'status' )
);
Expand All @@ -168,20 +168,20 @@ const DistributorPlugin = () => {
'#wp-admin-bar-distributor'
);

// eslint-disable-next-line no-shadow -- permission checks are needed.
// eslint-disable-next-line no-shadow
const post = useSelect( ( select ) =>
select( 'core/editor' ).getCurrentPost()
);

// Ensure the user has proper permissions
// Ensure the user has proper permissions.
if (
dtGutenberg.noPermissions &&
1 === parseInt( dtGutenberg.noPermissions )
) {
return null;
}

// Ensure we are on a supported post type
// Ensure we are on a supported post type.
if (
dtGutenberg.supportedPostTypes &&
dtGutenberg.supportedPostTypes[ postType ] === undefined
Expand All @@ -193,7 +193,7 @@ const DistributorPlugin = () => {
dt.postTitle = post.title;
dt.postStatus = post.status;

// If we are on a non-supported post status, change what we show
// If we are on a non-supported post status, change what we show.
if (
dtGutenberg.supportedPostStati &&
! dtGutenberg.supportedPostStati.includes( postStatus )
Expand Down

0 comments on commit d0bf34a

Please sign in to comment.