Skip to content

Commit

Permalink
refactor(analytics): ♻️ Remove PropTypes from CustomSeriesButtons com…
Browse files Browse the repository at this point in the history
…ponent
  • Loading branch information
jalezi committed Oct 26, 2024
1 parent 6f8d771 commit da65d7c
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions src/pages/Analytics/CustomSeriesButtons/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable react/prop-types */
/** @import * as Types from "../types" */

import PropTypes from 'prop-types';
import { useState } from 'react';

import SeriesButton from '../SeriesButton';
Expand All @@ -12,8 +12,6 @@ import SeriesButton from '../SeriesButton';
* @param {Object} props - The properties object.
* @param {Types.ChartRefProperty} props.chart - The Highcharts chart instance.
* @returns {JSX.Element} The rendered CustomSeriesButtons component.
* @example
* return <CustomSeriesButtons chart={chart} />;
*/
const CustomSeriesButtons = function CustomSeriesButtons({ chart }) {
const [buttonsVisibility, setButtonsVisibility] = useState(true);
Expand Down Expand Up @@ -71,19 +69,4 @@ const CustomSeriesButtons = function CustomSeriesButtons({ chart }) {
);
};

CustomSeriesButtons.propTypes = {
chart: PropTypes.shape({
series: PropTypes.arrayOf(
PropTypes.shape({
name: PropTypes.string,
visible: PropTypes.bool,
color: PropTypes.string,
setVisible: PropTypes.func,
// eslint-disable-next-line react/forbid-prop-types
group: PropTypes.object,
}),
),
}).isRequired,
};

export default CustomSeriesButtons;

0 comments on commit da65d7c

Please sign in to comment.