From 0e52785dfc5e99f48718530976083cfbd1507651 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Mon, 5 Jul 2021 15:36:23 +0200 Subject: ui: Fix linting errors --- .../opendc-web-ui/src/components/home/ContentSection.js | 5 ++++- .../opendc-web-ui/src/components/home/IntroSection.js | 5 +++++ .../opendc-web-ui/src/components/home/ModelingSection.js | 5 +++++ .../src/components/home/ScreenshotSection.js | 11 +++++++++++ .../src/components/home/SimulationSection.js | 9 +++++++-- .../src/components/home/StakeholderSection.js | 11 +++++++++++ .../opendc-web-ui/src/components/home/TeamSection.js | 16 ++++++++++++++++ .../src/components/home/TechnologiesSection.js | 5 +++++ 8 files changed, 64 insertions(+), 3 deletions(-) (limited to 'opendc-web/opendc-web-ui/src/components/home') diff --git a/opendc-web/opendc-web-ui/src/components/home/ContentSection.js b/opendc-web/opendc-web-ui/src/components/home/ContentSection.js index 3e9ad50a..abaa565c 100644 --- a/opendc-web/opendc-web-ui/src/components/home/ContentSection.js +++ b/opendc-web/opendc-web-ui/src/components/home/ContentSection.js @@ -1,7 +1,7 @@ +import PropTypes from 'prop-types' import React from 'react' import classNames from 'classnames' import { Container } from 'reactstrap' -import PropTypes from 'prop-types' import { contentSection } from './ContentSection.module.scss' const ContentSection = ({ name, title, children, className }) => ( @@ -15,6 +15,9 @@ const ContentSection = ({ name, title, children, className }) => ( ContentSection.propTypes = { name: PropTypes.string.isRequired, + title: PropTypes.string.isRequired, + children: PropTypes.node, + className: PropTypes.string, } export default ContentSection diff --git a/opendc-web/opendc-web-ui/src/components/home/IntroSection.js b/opendc-web/opendc-web-ui/src/components/home/IntroSection.js index 67e8cd8b..f9000d32 100644 --- a/opendc-web/opendc-web-ui/src/components/home/IntroSection.js +++ b/opendc-web/opendc-web-ui/src/components/home/IntroSection.js @@ -1,3 +1,4 @@ +import PropTypes from 'prop-types' import React from 'react' import Image from 'next/image' import { Container, Row, Col } from 'reactstrap' @@ -42,4 +43,8 @@ const IntroSection = ({ className }) => ( ) +IntroSection.propTypes = { + className: PropTypes.string, +} + export default IntroSection diff --git a/opendc-web/opendc-web-ui/src/components/home/ModelingSection.js b/opendc-web/opendc-web-ui/src/components/home/ModelingSection.js index af36aa45..8959663a 100644 --- a/opendc-web/opendc-web-ui/src/components/home/ModelingSection.js +++ b/opendc-web/opendc-web-ui/src/components/home/ModelingSection.js @@ -1,3 +1,4 @@ +import PropTypes from 'prop-types' import React from 'react' import ScreenshotSection from './ScreenshotSection' @@ -20,4 +21,8 @@ const ModelingSection = ({ className }) => ( ) +ModelingSection.propTypes = { + className: PropTypes.string, +} + export default ModelingSection diff --git a/opendc-web/opendc-web-ui/src/components/home/ScreenshotSection.js b/opendc-web/opendc-web-ui/src/components/home/ScreenshotSection.js index 9673b7b7..58fe1710 100644 --- a/opendc-web/opendc-web-ui/src/components/home/ScreenshotSection.js +++ b/opendc-web/opendc-web-ui/src/components/home/ScreenshotSection.js @@ -1,3 +1,4 @@ +import PropTypes from 'prop-types' import React from 'react' import Image from 'next/image' import { Row, Col } from 'reactstrap' @@ -25,4 +26,14 @@ const ScreenshotSection = ({ className, name, title, imageUrl, caption, imageIsR ) +ScreenshotSection.propTypes = { + className: PropTypes.string, + name: PropTypes.string, + title: PropTypes.string, + imageUrl: PropTypes.string, + caption: PropTypes.string, + imageIsRight: PropTypes.bool, + children: PropTypes.node, +} + export default ScreenshotSection diff --git a/opendc-web/opendc-web-ui/src/components/home/SimulationSection.js b/opendc-web/opendc-web-ui/src/components/home/SimulationSection.js index c154cc26..46ce6a35 100644 --- a/opendc-web/opendc-web-ui/src/components/home/SimulationSection.js +++ b/opendc-web/opendc-web-ui/src/components/home/SimulationSection.js @@ -1,3 +1,4 @@ +import PropTypes from 'prop-types' import React from 'react' import Image from 'next/image' import { Col, Row } from 'reactstrap' @@ -32,7 +33,7 @@ const SimulationSection = ({ className }) => { -

OpenDC's Simulator:

+

OpenDC's Simulator: