gocodebox/lifterlms

View on GitHub
packages/components/src/post-select/index.js

Summary

Maintainability
A
1 hr
Test Coverage

Function usePostOptions has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const usePostOptions = ( postType = 'course' ) => {
    const { posts, currentPostType } = useSelect( ( select ) => {
        return {
            posts: select( 'core' ).getEntityRecords( 'postType', postType ),
            currentPostType: select( 'core/editor' )?.getCurrentPostType(),
Severity: Minor
Found in packages/components/src/post-select/index.js - About 1 hr to fix

    There are no issues that match your filters.

    Category
    Status