You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I need help, what happen
gatsby-background-image add some Style tag but generate this error code
Warning: Prop
dangerouslySetInnerHTML
did not match. Server: "\n .css-udn85y:before,\n``
import React from 'react'
import { graphql, useStaticQuery } from 'gatsby'
import { getImage, GatsbyImage } from "gatsby-plugin-image"
import styled from '@emotion/styled';
import { convertToBgImage } from "gbimage-bridge"
import BackgroundImage from 'gatsby-background-image'
const GbiBridged = ({ children }) => {
const { placeholderImage } = useStaticQuery(
graphql
query { placeholderImage: file(relativePath: { eq: "paste.png" }) { childImageSharp { gatsbyImageData( width: 1000 placeholder: BLURRED formats: [AUTO, WEBP, AVIF] ) } } }
)
const image = getImage(placeholderImage)
// Use like this:
const bgImage = convertToBgImage(image)
const PageThumbWrapper = styled(BackgroundImage)
position: relative; width: 100%; height: 400px; @media screen and (max-width: 650px) { height: 300px; }
;return (
)
}
export default GbiBridged
``
Beta Was this translation helpful? Give feedback.
All reactions