Skip to content

Commit

Permalink
fix: component is not a valid JSX element
Browse files Browse the repository at this point in the history
  • Loading branch information
gautamjajoo authored and vincenzopalazzo committed Aug 10, 2022
1 parent 8b4a05e commit c1f8913
Show file tree
Hide file tree
Showing 4 changed files with 174 additions and 128 deletions.
20 changes: 1 addition & 19 deletions components/metricsView/cards/UpTimeNode.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ import Avatar from "@mui/material/Avatar";
import styles from "../../../styles/SummaryChannels.module.css";
import { GetInfoNode } from "../../../model/GetInfoNode";
import Timelapse from "@mui/icons-material/Timelapse";
import { LineSvgProps, ResponsiveLine as Line, Serie } from "@nivo/line";
import { AxisProps } from "@nivo/axes";
import Loading from "../../genericView/Loading.component";
import { ResponsiveLine, Serie } from "@nivo/line";
import { MetricsOneOutput } from "../../../model/Metrics";

type UpTimeProps = {
Expand All @@ -18,18 +16,6 @@ type UpTimeProps = {
show: (show: boolean, message: string) => void;
};

interface AxisCustomizedProps extends AxisProps {
orient?: string;
color?: string;
}
interface ResponsiveLineProps extends LineSvgProps {
axisBottom: AxisCustomizedProps;
axisLeft: AxisCustomizedProps;
}
function ResponsiveLine(props: ResponsiveLineProps) {
return <Line {...props} />;
}

export default function UpTimeNode({ nodeInfo, metrics, show }: UpTimeProps) {
let lineChartData: Array<Serie> = [];

Expand Down Expand Up @@ -137,24 +123,20 @@ export default function UpTimeNode({ nodeInfo, metrics, show }: UpTimeProps) {
axisTop={null}
axisRight={null}
axisBottom={{
orient: "bottom",
tickSize: 5,
tickPadding: 5,
tickRotation: 0,
legend: "Number of Days",
legendOffset: 45,
legendPosition: "middle",
color: "#fff",
}}
axisLeft={{
orient: "left",
tickSize: 5,
tickPadding: 5,
tickRotation: 0,
legend: "up_time",
legendOffset: -40,
legendPosition: "middle",
color: "#fff",
}}
colors={{ scheme: "nivo" }}
pointSize={10}
Expand Down
Loading

0 comments on commit c1f8913

Please sign in to comment.