jamesdanylik/www-jamesdanylik-com

View on GitHub
src/pages/mahjong.jsx

Summary

Maintainability
D
2 days
Test Coverage

File mahjong.jsx has 549 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React, { Component } from "react";
import Helmet from "react-helmet";
import { Line } from "react-chartjs-2";
import Dropdown from "react-dropdown";
import palette from "google-palette";
Severity: Major
Found in src/pages/mahjong.jsx - About 1 day to fix

    Function componentDidMount has 276 lines of code (exceeds 150 allowed). Consider refactoring.
    Open

      componentDidMount() {
        this.updateWindowDimensions();
        window.addEventListener("resize", this.updateWindowDimensions);
        console.log("componentDidMount");
    
    
    Severity: Major
    Found in src/pages/mahjong.jsx - About 6 hrs to fix

      Function createGraphDataset has 158 lines of code (exceeds 150 allowed). Consider refactoring.
      Open

        createGraphDataset(activeSeason, activeRoom, activeType) {
          console.log(`${activeSeason} ${activeRoom} ${activeType}`);
          const graphData = {
            labels: this.state.data.players.James.house.three.overall.data.map(
              p => (p.t ? p.t : 0)
      Severity: Major
      Found in src/pages/mahjong.jsx - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status