Showing 113 of 372 total issues
Function Footer
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function Footer() {
return (
<div className="bg-peacock">
<Row className={`${isMobile ? "footerLogoMobile" : "footerLogoDesktop"} position-absolute`}>
<img src={whiteLogo}
- Read upRead up
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 NavbarGHH
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
function NavbarGHH() {
const [navbar, setNavbar] = useState({'registration': '', 'mlhbanner': {'url': ''}, 'mlhwebsite': ''});
useEffect(() => {
Function NavbarGHH
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
function NavbarGHH() {
const [navbar, setNavbar] = useState({'registration': '', 'mlhbanner': {'url': ''}, 'mlhwebsite': ''});
useEffect(() => {
Function MobileHeader
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
function MobileHeader(props: Props) {
const [header, setHeader] = useState({'year': 2022, 'month': '', 'day': '', 'format': '', 'registration': ''});
useEffect(() => {
Function Newsletter
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Newsletter() {
const emailInput = useRef<HTMLInputElement>(null);
const endpoint = process.env.REACT_APP_GRAPHCMS_URL ? process.env.REACT_APP_GRAPHCMS_URL : "";
const graphcmsToken = process.env.REACT_APP_GRAPHCMS_TOKEN ? process.env.REACT_APP_GRAPHCMS_TOKEN : "";
const graphQLClient = new GraphQLClient(endpoint, {
Function Newsletter
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Newsletter() {
const emailInput = useRef<HTMLInputElement>(null);
const endpoint = process.env.REACT_APP_GRAPHCMS_URL ? process.env.REACT_APP_GRAPHCMS_URL : "";
const graphcmsToken = process.env.REACT_APP_GRAPHCMS_TOKEN ? process.env.REACT_APP_GRAPHCMS_TOKEN : "";
const graphQLClient = new GraphQLClient(endpoint, {
Function MobileHeader
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
function MobileHeader(props: Props) {
const [header, setHeader] = useState({'year': 2023, 'month': '', 'day': '', 'format': '', 'registration': ''});
useEffect(() => {
Function MobileHeader
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
function MobileHeader(props: Props) {
const [header, setHeader] = useState({'year': 2023, 'month': '', 'day': '', 'format': '', 'registration': '', 'time': ''});
useEffect(() => {
const fetchHeader = async () => {
Function MobileHeader
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
function MobileHeader(props: Props) {
const [header, setHeader] = useState({'year': 2022, 'month': '', 'day': '', 'format': '', 'registration': '', 'time': ''});
useEffect(() => {
const fetchHeader = async () => {
Function MobileHeader
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
function MobileHeader(props: Props) {
const [header, setHeader] = useState({'year': 2024, 'month': '', 'day': '', 'format': '', 'registration': '', 'time': ''});
useEffect(() => {
const fetchHeader = async () => {
Function Prizes
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Prizes(): JSX.Element {
const [prizes, setPrizes] = useState([{'id': '', 'prizeName': '', 'prizeObject': '', 'description': ''}]);
useEffect(() => {
const fetchPrizes = async () => {
Function Prizes
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Prizes(): JSX.Element {
const [prizes, setPrizes] = useState([{'id': '', 'prizeName': '', 'prizeObject': '', 'description': ''}]);
useEffect(() => {
const fetchPrizes = async () => {
Function Prizes
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Prizes(): JSX.Element {
const [prizes, setPrizes] = useState([{'id': '', 'prizeName': '', 'prizeObject': '', 'description': ''}]);
useEffect(() => {
const fetchPrizes = async () => {
Function About
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
function About() {
const [description, setDescription] = useState([{'id': '', 'ghhDescription': '', 'gwcDescription': ''}]);
let ghhDescription = [];
let gwcDescription = [];
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 : "",
`
{
Function Newsletter
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function Newsletter() {
const emailInput = useRef<HTMLInputElement>(null);
const endpoint = process.env.REACT_APP_GRAPHCMS_URL ? process.env.REACT_APP_GRAPHCMS_URL : "";
const graphcmsToken = process.env.REACT_APP_GRAPHCMS_TOKEN ? process.env.REACT_APP_GRAPHCMS_TOKEN : "";
const graphQLClient = new GraphQLClient(endpoint, {
- Read upRead up
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 Newsletter
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function Newsletter() {
const emailInput = useRef<HTMLInputElement>(null);
const endpoint = process.env.REACT_APP_GRAPHCMS_URL ? process.env.REACT_APP_GRAPHCMS_URL : "";
const graphcmsToken = process.env.REACT_APP_GRAPHCMS_TOKEN ? process.env.REACT_APP_GRAPHCMS_TOKEN : "";
const graphQLClient = new GraphQLClient(endpoint, {
- Read upRead up
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 MobileHeader
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function MobileHeader(props: Props) {
return(
<div id={props.id} className="container-fluid bg-turq">
<meta id="viewport" name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"></meta>
<Row>
Function Links
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Links() {
const [links, setLinks] = useState([{'title': '', 'link': '', 'id': ''}]);
useEffect(() => {
const fetchLinks = async () => {
Function Podcast
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Podcast(props: Props) {
return (
<div id={props.id} className="pb-5">
<Row className="justify-content-center">
<Col lg={6} md={8} sm={10} xs={11}>