ElectronicBabylonianLiterature/ebl-frontend

View on GitHub
src/http/withData.tsx

Summary

Maintainability
A
1 hr
Test Coverage
A
93%

Function withData has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function withData<PROPS, GETTER_PROPS, DATA>(
  WrappedComponent: React.ComponentType<WithData<PROPS, DATA>>,
  getter: (props: PROPS & GETTER_PROPS) => Promise<DATA>,
  config: Partial<Config<PROPS & GETTER_PROPS, DATA>> = {}
): React.ComponentType<PROPS & GETTER_PROPS> {
Severity: Minor
Found in src/http/withData.tsx - About 1 hr to fix

    Function ComponentWithData has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Wontfix

      return function ComponentWithData(props: PROPS & GETTER_PROPS): JSX.Element {
        const [data, setData] = useState<DATA | null>(null)
        const [error, setError] = useState<Error | null>(null)
    
        useEffect(
    Severity: Minor
    Found in src/http/withData.tsx - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status