pacificclimate/climate-explorer-frontend

View on GitHub
src/components/LayerOpacityControl/LayerOpacityControl.js

Summary

Maintainability
B
4 hrs
Test Coverage

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

  render() {
    // TODO: Extract this to a separate component
    const LayerVisibilityButton = ({ layerVisibility, onClick }) => (
      <Button bsSize={"xsmall"} onClick={onClick}>
        <Glyphicon glyph={layerVisibility ? "eye-open" : "eye-close"} />
Severity: Major
Found in src/components/LayerOpacityControl/LayerOpacityControl.js - About 3 hrs to fix

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

          ([layerType, opacity]) => {
            const visible = this.state.layerState[layerType].visible;
            return (
              <Row key={layerType} className="layer-controls">
                <Row>
    Severity: Minor
    Found in src/components/LayerOpacityControl/LayerOpacityControl.js - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status