vorteil/direktiv

View on GitHub
ui/src/pages/namespace/Explorer/Consumer/index.tsx

Summary

Maintainability
A
2 hrs
Test Coverage

Function ConsumerPage has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ConsumerPage: FC = () => {
  const pages = usePages();
  const { path } = pages.explorer.useParams();
  const namespace = useNamespace();
  const { segments } = analyzePath(path);
Severity: Minor
Found in ui/src/pages/namespace/Explorer/Consumer/index.tsx - About 1 hr to fix

    Avoid too many return statements within this function.
    Open

        return (
          <Card className="m-5 flex grow">
            <NoPermissions>{noPermissionMessage}</NoPermissions>
          </Card>
        );
    Severity: Major
    Found in ui/src/pages/namespace/Explorer/Consumer/index.tsx - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

        return (
          <>
            <div className="border-b border-gray-5 bg-gray-1 p-5 dark:border-gray-dark-5 dark:bg-gray-dark-1">
              <div className="flex flex-col gap-5 max-sm:space-y-4 sm:flex-row sm:items-center sm:justify-between">
                <h3 className="flex items-center gap-x-2 font-bold text-primary-500">
      Severity: Major
      Found in ui/src/pages/namespace/Explorer/Consumer/index.tsx - About 30 mins to fix

        There are no issues that match your filters.

        Category
        Status