diff --git a/priv/frontend/src/components/Graph.js b/priv/frontend/src/components/Graph.js index 1f60c3e..a22efae 100644 --- a/priv/frontend/src/components/Graph.js +++ b/priv/frontend/src/components/Graph.js @@ -1,4 +1,5 @@ import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import ms from 'ms'; import { ResponsiveLine } from '@nivo/line'; @@ -6,6 +7,10 @@ import { ResponsiveLine } from '@nivo/line'; import './Graph.css'; export default class Graph extends Component { + static propTypes = { + data: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.number)).isRequired, + } + state = { screenWidth: window.innerWidth, } diff --git a/priv/frontend/src/components/Service.js b/priv/frontend/src/components/Service.js index fee4e35..1dafccc 100644 --- a/priv/frontend/src/components/Service.js +++ b/priv/frontend/src/components/Service.js @@ -26,7 +26,7 @@ const Service = ({ graph, name, status, latency, description }) => (

{description}

- {graph ? : null} + {graph ? : null} );