Skip to content

Commit

Permalink
refactor: 🔥 remove despatch function from useState destructuring assi…
Browse files Browse the repository at this point in the history
…gnment to remove warning.
  • Loading branch information
ZahraMirzaei committed Apr 12, 2022
1 parent 2d07e15 commit 817f9d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/chart/Chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Card from "../UI/card/Card";
const SaleChart = () => {
const { t } = useTranslation();
const labels = data.revenueByMonths.labels.map((month) => t(month));
const [userData, setUserData] = useState({
const [userData] = useState({
labels,
datasets: [
{
Expand All @@ -23,7 +23,7 @@ const SaleChart = () => {
],
});

const [orderData, setOrderData] = useState({
const [orderData] = useState({
labels,
datasets: [
{
Expand All @@ -34,7 +34,7 @@ const SaleChart = () => {
],
});

const [revenueData, setRevenueData] = useState({
const [revenueData] = useState({
labels,
datasets: [
{
Expand Down

0 comments on commit 817f9d1

Please sign in to comment.