rugby-board/rugby-board-node

View on GitHub
client/pages/InfoPage.jsx

Summary

Maintainability
C
1 day
Test Coverage

Function constructor has 134 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  constructor(props) {
    super(props);
    setDocumentTitle('橄榄球资料');

    this.contentList = [
Severity: Major
Found in client/pages/InfoPage.jsx - About 5 hrs to fix

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

      render() {
        const totalColumns = Math.ceil(this.contentList.length / 2);
        const columnArray = Array.from(Array(totalColumns).keys());
        const contentWithColumns = columnArray.map((index) => {
          const columns = [index * 2, (index * 2) + 1].map((contentIndex) => {
    Severity: Minor
    Found in client/pages/InfoPage.jsx - About 1 hr to fix

      Function contentWithColumns has 39 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          const contentWithColumns = columnArray.map((index) => {
            const columns = [index * 2, (index * 2) + 1].map((contentIndex) => {
              const section = this.contentList[contentIndex];
              if (section !== undefined) {
                const sectionHeading = {
      Severity: Minor
      Found in client/pages/InfoPage.jsx - About 1 hr to fix

        Function columns has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

              const columns = [index * 2, (index * 2) + 1].map((contentIndex) => {
                const section = this.contentList[contentIndex];
                if (section !== undefined) {
                  const sectionHeading = {
                    id: section.id,
        Severity: Minor
        Found in client/pages/InfoPage.jsx - About 1 hr to fix

          There are no issues that match your filters.

          Category
          Status