cnap-cobre/synapse

View on GitHub
frontend/src/components/FileBrowser/FileBrowser.js

Summary

Maintainability
A
2 hrs
Test Coverage

Showing 4 of 4 total issues

Function render has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

render() {
const {
system,
systemPrefix,
pathname,
Severity: Minor
Found in frontend/src/components/FileBrowser/FileBrowser.js - About 1 hr to fix

    Avoid too many return statements within this function.
    Open

    return setFocusedFilesList(
    list.map(f => f.fullPath).slice(
    Math.min(mostRecentSelectionIndex, currentSelectionIndex),
    Math.max(mostRecentSelectionIndex, currentSelectionIndex) + 1,
    ),
    Severity: Major
    Found in frontend/src/components/FileBrowser/FileBrowser.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

      return setFocusedFile(file.fullPath);
      Severity: Major
      Found in frontend/src/components/FileBrowser/FileBrowser.js - About 30 mins to fix

        TODO found
        Open

        error: false, // TODO: fix this hack and actually handle errors
        Category
        Status