From 1e49c9bd842975999cebf93f14796e276a24f67a Mon Sep 17 00:00:00 2001 From: srgooglo Date: Wed, 17 Nov 2021 18:38:33 +0100 Subject: [PATCH] remove unused --- packages/app/src/pages/main/index.jsx | 49 --------------------------- 1 file changed, 49 deletions(-) diff --git a/packages/app/src/pages/main/index.jsx b/packages/app/src/pages/main/index.jsx index ac3d2fef..8921f404 100644 --- a/packages/app/src/pages/main/index.jsx +++ b/packages/app/src/pages/main/index.jsx @@ -1,55 +1,8 @@ import React from "react" -import * as antd from "antd" import { AppSearcher } from "components" -import * as charts from "react-chartjs-2" import "./index.less" -const data = { - labels: ["Red", "Orange", "Blue"], - datasets: [ - { - label: "Popularity of colours", - data: [55, 23, 96], - borderWidth: 5, - fill: false, - }, - ], -} - -const chartKeys = Object.fromEntries(Object.keys(charts).map((key) => { - return [String(key).toLowerCase(), key] -})) - -class ChartGenerator extends React.Component { - constructor(payload) { - super(payload) - this.payload = payload - - this.type = this.payload.type - this.Chart = charts[this.type] ?? charts[chartKeys[this.type]] - - this.state = { - labels: [], - datasets: [], - } - - if (!this.Chart) { - console.error("Chart type is not valid") - } - } - - render() { - const { Chart } = this - - if (React.isValidElement(Chart)) { - return null - } - - return - } -} - export default class Main extends React.Component { componentWillUnmount() { if (!window.app?.HeaderController?.isVisible()) { @@ -77,8 +30,6 @@ export default class Main extends React.Component {
-

Statistics

-
)