Coursemology/coursemology2

View on GitHub
client/app/workers/withHeartbeatWorker.tsx

Summary

Maintainability
A
2 hrs
Test Coverage

Function withHeartbeatWorker has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const withHeartbeatWorker = <P extends WrappedComponentProps>(
  Component: ComponentType<P>,
): ComponentType<P> => {
  const workerType = getWorkerType();
  if (!workerType) return Component;
Severity: Minor
Found in client/app/workers/withHeartbeatWorker.tsx - About 1 hr to fix

Function WrappedComponent has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const WrappedComponent = (props: P): JSX.Element => {
    const workerRef = useRef<HeartbeatWorker>();
    const [sessionId, setSessionId] = useState<number>();

    const params = useParams();
Severity: Minor
Found in client/app/workers/withHeartbeatWorker.tsx - About 1 hr to fix

There are no issues that match your filters.

Category
Status