#78 removed warnings
Merged 2 years ago by lbrabec. Opened 2 years ago by manishakanyal.
fedora-qa/ manishakanyal/landingpage fix/warnings  into  master

removed warnings
manisha • 2 years ago  
@@ -87,11 +87,13 @@ 

        this.state.config_mode ? this.available_components : this.state.enabled_components

      )

      components = components.map((row) => (

-       <>

+       <React.Fragment key={row}>

          {row.map((item) => (

-           <div className="padded col-md-6">{available_components[item]}</div>

+           <div className="padded col-md-6" key={item}>

+             {available_components[item]}

+           </div>

          ))}

-       </>

+       </React.Fragment>

      ))

  

      return (
@@ -111,7 +113,7 @@ 

                {components}

                <div className="padded col-md-12 text-right col-md-offset-2">

                  <Button className="mt" color="primary" onClick={this.toggleModal}>

-                   <i class="fas fa-cog"></i>

+                   <i className="fas fa-cog"></i>

                  </Button>

                  <Modal isOpen={this.state.showModal} toggle={this.toggleModal}>

                    <ModalHeader>Visibility Configuration</ModalHeader>
@@ -119,15 +121,15 @@ 

                      {this.available_components.map((item) => (

                        <React.Fragment key={item}>

                          <Col sm="12">

-                           <div class="custom-control custom-switch">

+                           <div className="custom-control custom-switch">

                              <input

                                type="checkbox"

-                               class="custom-control-input"

+                               className="custom-control-input"

                                id={item}

                                checked={this.state.enabled_components.includes(item)}

                                onChange={(e) => this.handleVisibilityChange(e, item)}

                              />{" "}

-                             <label class="custom-control-label" for={item}>

+                             <label className="custom-control-label" htmlFor={item}>

                                {item === "events"

                                  ? "Meetings and testdays in the next 7 days"

                                  : item === "minutes"
@@ -158,7 +160,7 @@ 

                    className="btn btn-primary btn-block btn-wrap-text btn-lg active"

                    to="/wizard"

                    role="button">

-                   Explore <i class="fas fa-search"></i>

+                   Explore <i className="fas fa-search"></i>

                  </Link>

                </div>

              </Row>

@@ -157,7 +157,6 @@ 

      }

  

      const testtype = extra_data.testtype

-     const tc_rawname = extra_data.display_name

  

      return (

        <ModalInfo buttonLabel={name}>
@@ -388,7 +387,7 @@ 

  

      return (

        <div>

-         <a href="#" onClick={(e) => this.toggle(e)}>

+         <a href="/#" onClick={(e) => this.toggle(e)}>

            {this.props.buttonLabel}

          </a>

          <Modal

file modified
+4 -5
@@ -18,13 +18,12 @@ 

  

    const dispatch = useDispatch()

  

-   const getData = () => {

-     dispatch(loadWizardData())

-   }

- 

    useEffect(() => {

+     const getData = () => {

+       dispatch(loadWizardData())

+     }

      getData()

-   }, [])

+   }, [dispatch])

  

    return (

      <Layout apiCallStatus={api_call_status}>

file modified
+2 -2
@@ -1,6 +1,6 @@ 

  import React, { useState } from "react"

- import { Link, useHistory } from "react-router-dom"

- import { Card, CardText, Button, Col, Row } from "reactstrap"

+ import { useHistory } from "react-router-dom"

+ import { Card, CardText, Col, Row } from "reactstrap"

  

  const Step1 = (props) => {

    const [selectedItem, setItem] = useState()

file modified
+1 -4
@@ -1,4 +1,4 @@ 

- import React, { useState } from "react"

+ import React from "react"

  import { Row, Col, Card, CardBody, CardHeader } from "reactstrap"

  import { shallowEqual, useSelector } from "react-redux"

  import * as R from "ramda"
@@ -7,15 +7,12 @@ 

  const Step4 = (props) => {

    const { query } = props

  

-   const [selectItem, setselectItem] = useState()

- 

    const history = useHistory()

  

    const handleChange = (option) => {

      history.push(

        `/wizard/${query.duration}/${query.provider}/${query.action}/${encodeURIComponent(option)}`

      )

-     setselectItem(option)

    }

  

    const selectAction = (state) => state.wizard.all_actions

@lbrabec removed warnings, please have a look.

Thanks! This is better :)

Could you also please fix this:

  • class -> className in src/Landingpage.js:114
  • add key prop to <div> in src/Landingpage.js:92

rebased onto 884849c

2 years ago

Fixed, please have a look!

Pull-Request has been merged by lbrabec

2 years ago