PracticaDS / pdes-tp-team_prog

Pdes-tp-team_prog
0 stars 0 forks source link

Warning message in the FactoryGrid Component #75

Closed LaimeJesus closed 5 years ago

LaimeJesus commented 5 years ago

When we run yarn test it throws the following warning message

 FAIL  src/components/FactoryGrid/FactoryGrid.spec.jsx
  ● Console

    console.error node_modules/prop-types/checkPropTypes.js:20
      Warning: Failed prop type: Invalid prop `image` of type `object` supplied to `CardMedia`, expected `string`.
          in CardMedia (created by WithStyles(CardMedia))
          in WithStyles(CardMedia) (created by CrafterMachineNode)
          in div (created by Paper)
          in Paper (created by WithStyles(Paper))
          in WithStyles(Paper) (created by Card)
          in Card (created by WithStyles(Card))
          in WithStyles(Card) (created by CrafterMachineNode)
          in CrafterMachineNode (created by Block)
          in div (created by Paper)
          in Paper (created by WithStyles(Paper))
          in WithStyles(Paper) (created by Card)
          in Card (created by WithStyles(Card))
          in WithStyles(Card) (created by Block)
          in div (created by Block)
          in Block (created by ConnectFunction)
          in ConnectFunction (created by FactoryGrid)
          in div (created by FactoryGrid)
          in div (created by FactoryGrid)
          in FactoryGrid (created by ConnectFunction)
          in ConnectFunction
          in Provider

  ● render simple Grid Component with 2x2 Blocks

This occurs because the property image passed in CardMedia is an object instead of a string. I thought that we should be able to fix this one, but this react team post says that we can't use url strings for image paths using the non-ejected webpack configuration.

https://facebook.github.io/create-react-app/docs/adding-images-fonts-and-files https://github.com/facebook/create-react-app/issues/585

FedeLochbaum commented 5 years ago

Currently is not reproducible, i going to close this one, if come back, we re open the issue 😄

Screen Shot 2019-05-11 at 7 54 12 AM