civictechindex/CTI-website-frontend

View on GitHub

Showing 25 of 39 total issues

Function renderCurrentState has 161 lines of code (exceeds 150 allowed). Consider refactoring.
Open

const renderCurrentState = () => {
switch (displayState) {
case 'ProjectUrl':
return (
<>
Severity: Major
Found in src/pages/TagGeneratorWizard/index.js - About 1 hr to fix

Function Faq has a Cognitive Complexity of 13 (exceeds 8 allowed). Consider refactoring.
Open

const Faq = () => {
const classes = useStyles();
const theme = useTheme();
const largeScreen = useMediaQuery(theme.breakpoints.up('sm'), {
noSsr: true,
Severity: Minor
Found in src/pages/Faq/index.js - About 1 hr to fix

Function IndvPageContainer has a Cognitive Complexity of 12 (exceeds 8 allowed). Consider refactoring.
Open

export const IndvPageContainer = (props) => {
const classes = useStyles();
const projectsPerPage = 4;
 
const inputSortMethodList = ['best match', 'updated', 'stars'];
Severity: Minor
Found in src/pages/IndvOrganization/IndvPageContainer.js - About 55 mins to fix

Function OrgChange has a Cognitive Complexity of 11 (exceeds 8 allowed). Consider refactoring.
Open

export const OrgChange = ({
value,
orgName,
setOrgName,
setOrgTags,
Severity: Minor
Found in src/pages/TagGeneratorWizard/Organization.js - About 45 mins to fix

Function SortDropdown has a Cognitive Complexity of 11 (exceeds 8 allowed). Consider refactoring.
Open

export const SortDropdown = ({
inputSortMethodList,
defaultSortMethod,
setSortMethod,
}) => {
Severity: Minor
Found in src/components/SortDropdown.js - About 45 mins to fix
Severity
Category
Status
Source
Language