dadoagency / contentful-gatsby-components

0 stars 0 forks source link

validateDOMNesting(...): <p> cannot appear as a descendant of <p>. #5

Open Geimaj opened 4 years ago

Geimaj commented 4 years ago

Something in advertorial type 2 is causing nested p's

index.js:2177 Warning: validateDOMNesting(...): <p> cannot appear as a descendant of <p>.
    in p (created by AdvertorialType2)
    in span (at StyledText/index.js:20)
    in Wrapper (at StyledText/index.js:27)
    in StyledText (at richText.js:155)
    in p (created by AdvertorialType2)
    in div (at richText.js:132)
    in div (at Article/index.js:25)
    in div (at Article/index.js:24)
    in div (at Article/index.js:23)
    in div (at Article/index.js:14)
    in Article (at AdvertorialType2/index.js:113)
    in div (at AdvertorialType2/index.js:112)
    in div (at Layout/index.js:28)
    in section (at Layout/index.js:27)
    in div (at Layout/index.js:22)
    in _default (at AdvertorialType2/index.js:89)
    in AdvertorialType2 (at AdvertorialType2/index.js:203)
    in PageProvider (at AdvertorialType2/index.js:202)
    in _default (at AdvertorialType2.js:30)
    in _default (created by HotExported_default)
    in AppContainer (created by HotExported_default)
    in HotExported_default (created by PageRenderer)
    in PageRenderer (at query-result-store.js:86)
    in PageQueryStore (at root.js:56)
    in RouteHandler (at root.js:78)
    in div (created by FocusHandlerImpl)
    in FocusHandlerImpl (created by Context.Consumer)
    in FocusHandler (created by RouterImpl)
    in RouterImpl (created by Context.Consumer)
    in Location (created by Context.Consumer)
    in Router (at root.js:73)
    in ScrollHandler (at root.js:69)
    in RouteUpdates (at root.js:68)
    in EnsureResources (at root.js:66)
    in LocationHandler (at root.js:124)
    in LocationProvider (created by Context.Consumer)
    in Location (at root.js:123)
    in Root (at root.js:132)
    in StaticQueryStore (at root.js:138)
    in _default (at app.js:94)
Geimaj commented 4 years ago

https://www.contentfulcommunity.com/t/error-p-cannot-appear-as-a-descendant-of-p/4348

https://stackoverflow.com/questions/51515334/react-warning-validatedomnesting-p-cannot-appear-as-a-descendant-of

Geimaj commented 4 years ago

Trying to render DOM prop wrapped in a p?

https://github.com/dadoagency/contentful-gatsby-components/blob/33bc14c9f98242ec089c1f30538f0e12949edd5f/src/components/Reviews/Trustpilot/TrustpilotReviewB.js#L29