mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-12 16:57:39 -05:00
cleaned up the routing
This commit is contained in:
@@ -1,27 +1,22 @@
|
||||
import React, { Component } from "react"
|
||||
import React, { Component } from "react"
|
||||
import ErrorChart from "./ErrorChart"
|
||||
import { ParentSize } from "@visx/responsive";
|
||||
|
||||
class ResponsiveErrorChart extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
}
|
||||
const ResponsiveErrorChart = (props) => {
|
||||
|
||||
render() {
|
||||
return(
|
||||
<ParentSize className="graph-container">
|
||||
{({ width: w, height: h }) => {
|
||||
return (
|
||||
<ErrorChart
|
||||
width={w}
|
||||
height={h}
|
||||
data={this.props.data}
|
||||
/>
|
||||
);
|
||||
}}
|
||||
</ParentSize>
|
||||
)
|
||||
}
|
||||
return (
|
||||
<ParentSize className="graph-container">
|
||||
{({ width: w, height: h }) => {
|
||||
return (
|
||||
<ErrorChart
|
||||
width={w}
|
||||
height={h}
|
||||
data={props.data}
|
||||
/>
|
||||
);
|
||||
}}
|
||||
</ParentSize>
|
||||
)
|
||||
}
|
||||
|
||||
export default ResponsiveErrorChart
|
||||
|
||||
Reference in New Issue
Block a user