gwcuva/gwc-website

View on GitHub
src/components/Main/Team/Team.tsx

Summary

Maintainability
B
4 hrs
Test Coverage

Function Team has 79 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function Team(props: Props) {
  const [team, setTeam] = useState([{'id': '', 'name': '', 'position': '', 'academicYear': '', 'headshot': {'url': ''}, 'linkedin': ''}]);
  const [academicYear, setAcademicYear] = useState('');
  const [boardYears, setBoardYears] = useState(['']);

Severity: Major
Found in src/components/Main/Team/Team.tsx - About 3 hrs to fix

    Function fetchTeam has 41 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        const fetchTeam = async () => {
          const { executiveMembers } = await request(
            process.env.REACT_APP_GRAPHCMS_URL ? process.env.REACT_APP_GRAPHCMS_URL : "",
            `
              { 
    Severity: Minor
    Found in src/components/Main/Team/Team.tsx - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status