line chart bug fixed

This commit is contained in:
Kakabay 2022-12-25 16:33:36 +05:00
parent 3fc7e783f5
commit 5034786270
2 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,8 @@
// Modules
import { useState, useEffect } from 'react';
import { Api } from '../helpers/api';
import { v4 as uuidv4 } from 'uuid';
// Components
import TableRow from './TableRow';
@ -60,7 +62,7 @@ const ChartTable = ({ activeRow, setActiveRow, tabIndex, lang }) => {
? dataTable.data.map((tableRow, index) => {
return (
<TableRow
key={tableRow.id}
key={uuidv4()}
title={tableRow.title}
titleHide={tableRow.title.length > 7 ? 'title-hide' : null}
priceChange={tableRow.price_change}

View File

@ -2,6 +2,7 @@
import React from 'react';
import { useState, useEffect } from 'react';
import { Api } from '../helpers/api';
import { v4 as uuidv4 } from 'uuid';
// Components
import ChartTable from './ChartTable';
import LineChart from './LineChart';
@ -43,7 +44,7 @@ const DataChart = ({ lang }) => {
? tabData.data.map((tab, index) => {
return (
<div
key={tab.id}
key={uuidv4()}
className={`${tabIndex === tab.id ? 'active' : ''} tab`}
onClick={() => {
tabDataFetch(tab.id, index);