From d89e75da15514e8bd91d2cc5f8469ae821735834 Mon Sep 17 00:00:00 2001 From: MuhammadKhalilzadeh Date: Thu, 20 Jun 2024 18:34:36 +0330 Subject: [PATCH] a small fix --- Client/src/Components/Charts/BarChart/BarChart.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Client/src/Components/Charts/BarChart/BarChart.jsx b/Client/src/Components/Charts/BarChart/BarChart.jsx index af148f6fe..e424fef3e 100644 --- a/Client/src/Components/Charts/BarChart/BarChart.jsx +++ b/Client/src/Components/Charts/BarChart/BarChart.jsx @@ -1,7 +1,8 @@ import React from "react"; import "./barChart.css"; +import PropTypes from "prop-types"; -const BarChart = ({ checks }) => { +const BarChart = ({ checks = [] }) => { return (
{checks.map((value, index) => ( @@ -15,4 +16,8 @@ const BarChart = ({ checks }) => { ); }; +BarChart.propTypes = { + checks: PropTypes.array, +}; + export default BarChart;