client/pages/InfoPage.jsx
Function constructor
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(props) {
super(props);
setDocumentTitle('橄榄球资料');
this.contentList = [
Function render
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
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) => {
Function contentWithColumns
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
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 = {
Function columns
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const columns = [index * 2, (index * 2) + 1].map((contentIndex) => {
const section = this.contentList[contentIndex];
if (section !== undefined) {
const sectionHeading = {
id: section.id,