Refactor public/src/client/header/unread.js to reduce Cognitive Complexity from 21 to the 15 allowed. This issue is categorized under the "Adaptability" section and involves a critical "Code Smell."
PLEASE READ:
You may notice that this is similar to #350, however, I didn't see that request when I submitted this issue because the name of the file is incorrect in 350. It says src/client/header/unread.js, but should be public/src/client/header/unread.js. This prevented me from finding issue 350 when I searched to see if this issue was already claimed. I got approval from the professor that this is okay.
Refactor public/src/client/header/unread.js to reduce Cognitive Complexity from 21 to the 15 allowed. This issue is categorized under the "Adaptability" section and involves a critical "Code Smell."
Here is the warning this refactor will fix: https://sonarcloud.io/project/issues?assigned=false&cleanCodeAttributeCategories=ADAPTABLE&directories=public%2Fsrc%2Fclient%2Fheader&issueStatuses=OPEN%2CCONFIRMED&id=CMU-313_NodeBB&open=AZFmi_z7ybYwxy-_uEQ2&tab=code
PLEASE READ: You may notice that this is similar to #350, however, I didn't see that request when I submitted this issue because the name of the file is incorrect in 350. It says src/client/header/unread.js, but should be public/src/client/header/unread.js. This prevented me from finding issue 350 when I searched to see if this issue was already claimed. I got approval from the professor that this is okay.