Skip to content

Commit

Permalink
Removed redundant data
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyaparadkar committed Aug 6, 2021
1 parent 7bb7b70 commit 681e5b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions webapp/src/components/ChartsContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ import AreaChartComponent from './AreaChartComponent';

const ChartsContainer = (params) => {
const { data } = params;
const { baseParam, chartsParams, logs } = getAllParams(data);
const { baseParam, chartsParams } = getAllParams(data);

if (baseParam === 'epoch') {
return (
chartsParams.map(
(item) => <AreaChartComponent xaxis={baseParam} lineA={item} lineB={`val_${item}`} logs={logs} key={item} />,
(item) => <AreaChartComponent xaxis={baseParam} lineA={item} lineB={`val_${item}`} logs={data} key={item} />,
)
);
}

return (
chartsParams.map(
(item) => <AreaChartComponent xaxis={baseParam} lineA={item} logs={logs} key={item} />,
(item) => <AreaChartComponent xaxis={baseParam} lineA={item} logs={data} key={item} />,
)
);
};
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/helpers/getChartsDataFormat.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const getAllParams = (data) => {
chartsParams = charts;
}

return { baseParam, logs: data, chartsParams };
return { baseParam, chartsParams };
};

export default getAllParams;

0 comments on commit 681e5b5

Please sign in to comment.