Skip to content

Commit c417b2b

Browse files
committedDec 26, 2021
feat(website): test chart SEO image with AreaBump
1 parent 4316288 commit c417b2b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
 

‎website/src/pages/area-bump/index.js

+17
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import React from 'react'
22
import range from 'lodash/range'
33
import random from 'lodash/random'
4+
import { useStaticQuery, graphql } from 'gatsby'
5+
import { getSrc } from 'gatsby-plugin-image'
46
import { patternDotsDef, patternLinesDef } from '@nivo/core'
57
import { ResponsiveAreaBump, AreaBumpDefaultProps } from '@nivo/bump'
68
import { ComponentTemplate } from '../../components/components/ComponentTemplate'
@@ -103,6 +105,20 @@ const initialProperties = {
103105
}
104106

105107
const Bump = () => {
108+
const {
109+
image: {
110+
childImageSharp: { gatsbyImageData: image },
111+
},
112+
} = useStaticQuery(graphql`
113+
query {
114+
image: file(absolutePath: { glob: "**/src/assets/captures/bump.png" }) {
115+
childImageSharp {
116+
gatsbyImageData(layout: FIXED, width: 900, quality: 100)
117+
}
118+
}
119+
}
120+
`)
121+
106122
return (
107123
<ComponentTemplate
108124
name="AreaBump"
@@ -115,6 +131,7 @@ const Bump = () => {
115131
initialProperties={initialProperties}
116132
propertiesMapper={mapper}
117133
generateData={generateData}
134+
image={image}
118135
>
119136
{(properties, data, theme, logAction) => {
120137
return (

0 commit comments

Comments
 (0)
Please sign in to comment.