gwcuva/gwc-website

View on GitHub

Showing 113 of 372 total issues

Function Schedule has 166 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function Schedule() {
  const [events, setEvents] = useState([{'eventName': '', 'link': '', 'startTime': '', 'description': '', 'day': 0, 'linkText': '', 'endTime':''}]);
  const [dates, setDates] = useState([{'dayOfWeek': '', 'month': '', 'date': 0}]);

  const [open1, setOpen1] = useState(false);
Severity: Major
Found in src/components/GirlsHooHack2022/Schedule/Schedule.tsx - About 6 hrs to fix

    Function Schedule has 166 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function Schedule() {
      const [events, setEvents] = useState([{'eventName': '', 'link': '', 'startTime': '', 'description': '', 'day': 0, 'linkText': '', 'endTime':''}]);
      const [dates, setDates] = useState([{'dayOfWeek': '', 'month': '', 'date': 0}]);
    
      const [open1, setOpen1] = useState(false);
    Severity: Major
    Found in src/components/GirlsHooHack2023/Schedule/Schedule.tsx - About 6 hrs to fix

      Function Sponsors has 125 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function Sponsors() {
      
        const [sponsors, setSponsors] = useState([{'level': '', 'sponsorImage': {'url': ''}, 'sponsorName': '', 'sponsorUrl': '', 'size': ''}]);
      
        useEffect(() => {
      Severity: Major
      Found in src/components/GirlsHooHack2022/Sponsors/Sponsors.tsx - About 5 hrs to fix

        Function JumpStart has 123 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function JumpStart() {
          const [workshops, setWorkshops] = useState([{'id': '', 'workshopName': '', 'workshopDate': '', 'description': '', 'link': '', 'linkName': ''}]);
          const [description, setDescription] = useState({'titleQuestion': '', 'description': ''});
          const [dropdownOpen, setDropdownOpen] = useState(false);
        
        
        Severity: Major
        Found in src/components/GirlsHooHack2022/JumpStart/JumpStart.tsx - About 4 hrs to fix

          Function JumpStart has 123 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function JumpStart() {
            const [workshops, setWorkshops] = useState([{'id': '', 'workshopName': '', 'workshopDate': '', 'description': '', 'link': '', 'linkName': ''}]);
            const [description, setDescription] = useState({'titleQuestion': '', 'description': ''});
            const [dropdownOpen, setDropdownOpen] = useState(false);
          
          
          Severity: Major
          Found in src/components/GirlsHooHack2023/JumpStart/JumpStart.tsx - About 4 hrs to fix

            Function Sponsors has 122 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function Sponsors() {
              /*return (
                <Row className={`bg-hack-grey justify-content-center py-5`}>
                  <Col sm={10} xs={11} className={isMobile ? "my-3" : "my-5 py-5"}>
                    <h2 className="text-orange hack">Companies Attending</h2>
            Severity: Major
            Found in src/components/CareerFair2024/Sponsors/Sponsors.tsx - About 4 hrs to fix

              Function Sponsors has 122 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function Sponsors() {
              
                const [sponsors, setSponsors] = useState([{'level': '', 'sponsorImage': {'url': ''}, 'sponsorName': '', 'sponsorUrl': '', 'size': ''}]);
              
                useEffect(() => {
              Severity: Major
              Found in src/components/GirlsHooHack2023/Sponsors/Sponsors.tsx - About 4 hrs to fix

                Function MobileNavbarGHHs has 122 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function MobileNavbarGHHs() {
                
                    const [menuOpen, setMenuOpen] = useState(false);
                
                    const menuClosedHandler = () => {
                Severity: Major
                Found in src/components/GirlsHooHack2023/NavbarGHH/MobileNavbarGHHs.tsx - About 4 hrs to fix

                  Function Sponsors has 122 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function Sponsors() {
                    /*return (
                      <Row className={`bg-hack-grey justify-content-center py-5`}>
                        <Col sm={10} xs={11} className={isMobile ? "my-3" : "my-5 py-5"}>
                          <h2 className="text-orange hack">Companies Attending</h2>
                  Severity: Major
                  Found in src/components/CareerFair2022/Sponsors/Sponsors.tsx - About 4 hrs to fix

                    Function MobileNavbarGHHs has 122 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function MobileNavbarGHHs() {
                    
                        const [menuOpen, setMenuOpen] = useState(false);
                    
                        const menuClosedHandler = () => {
                    Severity: Major
                    Found in src/components/GirlsHooHack2022/NavbarGHH/MobileNavbarGHHs.tsx - About 4 hrs to fix

                      Function Sponsors has 122 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function Sponsors() {
                        /*return (
                          <Row className={`bg-hack-grey justify-content-center py-5`}>
                            <Col sm={10} xs={11} className={isMobile ? "my-3" : "my-5 py-5"}>
                              <h2 className="text-orange hack">Companies Attending</h2>
                      Severity: Major
                      Found in src/components/CareerFair2023/Sponsors/Sponsors.tsx - About 4 hrs to fix

                        Function Schedule has 121 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function Schedule() {
                          // const [events, setEvents] = useState([{'id': '', 'eventName': '', 'link': '', 'time': '', 'description': ''}]);
                          // const [dates, setDates] = useState(['']);
                        
                          const [open1, setOpen1] = useState(false);
                        Severity: Major
                        Found in src/components/GirlsHooHack2021/Schedule/Schedule.tsx - About 4 hrs to fix

                          Function JumpStart has 101 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function JumpStart() {
                            const [workshops, setWorkshops] = useState([{'id': '', 'workshopName': '', 'workshopDate': '', 'description': ''}]);
                            const [dropdownOpen, setDropdownOpen] = useState(false);
                          
                            useEffect(() => {
                          Severity: Major
                          Found in src/components/GirlsHooHack2021/JumpStart/JumpStart.tsx - About 4 hrs to fix

                            Function Sponsors has 100 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function Sponsors() {
                            
                              const [sponsors, setSponsors] = useState([{'level': '', 'sponsorImage': {'url': ''}, 'sponsorName': '', 'sponsorUrl': '', 'size': ''}]);
                            
                              useEffect(() => {
                            Severity: Major
                            Found in src/components/GirlsHooHack2021/Sponsors/Sponsors.tsx - About 4 hrs to fix

                              Function Footer has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function Footer() {
                                return (
                                  <div className="bg-peacock">
                                    <Row className={`${isMobile ? "footerLogoMobile" : "footerLogoDesktop"} position-absolute`}>
                                      <img src={whiteLogo} 
                              Severity: Major
                              Found in src/components/GirlsHooHack2023/Footer/Footer.tsx - About 3 hrs to fix

                                Function Footer has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function Footer() {
                                  return (
                                    <div className="bg-peacock">
                                      <Row className={`${isMobile ? "footerLogoMobile" : "footerLogoDesktop"} position-absolute`}>
                                        <img src={whiteLogo} 
                                Severity: Major
                                Found in src/components/GirlsHooHack2022/Footer/Footer.tsx - About 3 hrs to fix

                                  Function Footer has 96 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function Footer() {
                                    return (
                                      <div className="bg-peacock">
                                        <Row className={`${isMobile ? "footerLogoMobile" : "footerLogoDesktop"} position-absolute`}>
                                          <img src={whiteLogo} 
                                  Severity: Major
                                  Found in src/components/GirlsHooHack2021/Footer/Footer.tsx - About 3 hrs to fix

                                    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 Footer has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                      function Footer() {
                                        return (
                                          <div className="bg-peacock">
                                            <Row className={`${isMobile ? "footerLogoMobile" : "footerLogoDesktop"} position-absolute`}>
                                              <img src={whiteLogo} 
                                      Severity: Minor
                                      Found in src/components/GirlsHooHack2021/Footer/Footer.tsx - About 2 hrs to fix

                                      Cognitive Complexity

                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                      A method's cognitive complexity is based on a few simple rules:

                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                      • Code is considered more complex for each "break in the linear flow of the code"
                                      • Code is considered more complex when "flow breaking structures are nested"

                                      Further reading

                                      Function Footer has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function Footer() {
                                        return (
                                          <div className="bg-peacock">
                                            <Row className={`${isMobile ? "footerLogoMobile" : "footerLogoDesktop"} position-absolute`}>
                                              <img src={whiteLogo} 
                                      Severity: Major
                                      Found in src/components/CareerFair2023/Footer/Footer.tsx - About 2 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language