Skip to content

Commit

Permalink
Removed unused console.logs and variables
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkishpolicy committed Dec 27, 2024
1 parent 2da4510 commit cbd704d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
4 changes: 0 additions & 4 deletions frontend/src/pages/Risk/VulnerabilityBarChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ const VulnerabilityBarChart = (props: {
value: d.value
};
});
console.log('data', data);
console.log('titleCaseData', titleCaseData);

// Group the data by severity level and "Other". Sum the values for each group.
const groupedData = titleCaseData
Expand Down Expand Up @@ -119,8 +117,6 @@ const VulnerabilityBarChart = (props: {
return acc;
}, {});

console.log('groupedData', groupedData);

// Sort the data to ensure "N/A", "Low", "Medium", "High", and "Critical" appear in the desired order
const sortedData = Object.entries(groupedData)
.map(([id, value]) => ({ id, value }))
Expand Down
8 changes: 1 addition & 7 deletions frontend/src/pages/Vulnerabilities/Vulnerabilities.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,7 @@ export const Vulnerabilities: React.FC<{ groupBy?: string }> = ({
if (severityLevels.includes(titleCaseSev)) {
return titleCaseSev;
}
console.log('severity', severity);
console.log('titleCaseSev', titleCaseSev);

if (
titleCaseSev === null ||

Check notice

Code scanning / CodeQL

Unneeded defensive code Note

This guard always evaluates to false.
titleCaseSev === undefined ||
Expand Down Expand Up @@ -371,11 +370,6 @@ export const Vulnerabilities: React.FC<{ groupBy?: string }> = ({
};
});

const vulnSeverities = vulnerabilities.map((vuln) => vuln.severity);
console.log('vulnSevs', vulnSeverities);
const vulRowsSeverities = vulRows.map((vuln) => vuln.severity);
console.log('vulnRowsSevs', vulRowsSeverities);

const vulCols: GridColDef[] = [
{
field: 'title',
Expand Down

0 comments on commit cbd704d

Please sign in to comment.