Skip to content

Commit dcfd2ab

Browse files
committed
Fix: add PropTypes for profileData.skillInfo to resolve SonarQube validation error
1 parent c1b9e90 commit dcfd2ab

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

  • src/components/HGNSkillsDashboard/SkillsProfilePage/components

src/components/HGNSkillsDashboard/SkillsProfilePage/components/RadarChart.jsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
Legend,
1111
} from 'chart.js';
1212
import { useState, useEffect } from 'react';
13+
import PropTypes from 'prop-types';
1314
import styles from '../styles/RadarChart.module.css';
1415

1516
ChartJS.register(RadialLinearScale, PointElement, LineElement, Filler, Tooltip, Legend);
@@ -352,4 +353,15 @@ function RadarChart({ profileData, compact = true }) {
352353
);
353354
}
354355

356+
RadarChart.propTypes = {
357+
profileData: PropTypes.shape({
358+
skillInfo: PropTypes.shape({
359+
general: PropTypes.object,
360+
frontend: PropTypes.object,
361+
backend: PropTypes.object,
362+
}),
363+
}),
364+
compact: PropTypes.bool,
365+
};
366+
355367
export default RadarChart;

0 commit comments

Comments
 (0)