Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default ({ node, dataset }) => {
const config = {
projectId: process.env.GATSBY_SANITY_PROJECT_ID || 'atggkqis',
dataset: process.env.GATSBY_SANITY_DATASET || dataset || 'production',
token: process.env.SANITY_READ_TOKEN
}
const fluidProps = getFluidGatsbyImage(node.asset._id, { maxWidth: 675 }, config)
return <img alt="{node.alt}">
}
export default ({ node }) => {
if (!node.asset) {
return null
}
const sanityConfig = useSanityConfig()
const fluidProps = getFluidGatsbyImage(
node.asset._ref,
{ maxWidth: 1440 },
sanityConfig
)
return (
<figure>
</figure>
export default ({node}) => {
if (!node.asset) {
return null
}
const fluidProps = getFluidGatsbyImage(node.asset._ref, {maxWidth: 675}, clientConfig.sanity)
return (
<figure>
<img alt="{node.alt}">
{node.caption && <figcaption>{node.caption}</figcaption>}
</figure>
)
}
export default ({node}) => {
if (!node || !node.asset || !node.asset._id) { return null }
const fluidProps = getFluidGatsbyImage(
node.asset._id,
{maxWidth: 675},
clientConfig.sanity
)
return (
<figure>
<img alt="{node.alt}">
<figcaption>{node.caption}</figcaption>
</figure>
)
}
export default ({ node }) => {
if (!node.asset) {
return null
}
const sanityConfig = useSanityConfig()
const fluidProps = getFluidGatsbyImage(
node.asset._ref,
{ maxWidth: 1440 },
sanityConfig
)
return (
<figure>
</figure>
export default ({node}) => {
const fluidProps = getFluidGatsbyImage(
node.asset._id,
{maxWidth: 675},
clientConfig.sanity
)
return (
<figure>
<img alt="{node.alt}">
<figcaption>{node.caption}</figcaption>
</figure>
)
}