Skip to content

Commit

Permalink
feat(website): test chart SEO image with AreaBump
Browse files Browse the repository at this point in the history
  • Loading branch information
plouc committed Dec 26, 2021
1 parent 4316288 commit c417b2b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions website/src/pages/area-bump/index.js
@@ -1,6 +1,8 @@
import React from 'react'
import range from 'lodash/range'
import random from 'lodash/random'
import { useStaticQuery, graphql } from 'gatsby'
import { getSrc } from 'gatsby-plugin-image'
import { patternDotsDef, patternLinesDef } from '@nivo/core'
import { ResponsiveAreaBump, AreaBumpDefaultProps } from '@nivo/bump'
import { ComponentTemplate } from '../../components/components/ComponentTemplate'
Expand Down Expand Up @@ -103,6 +105,20 @@ const initialProperties = {
}

const Bump = () => {
const {
image: {
childImageSharp: { gatsbyImageData: image },
},
} = useStaticQuery(graphql`
query {
image: file(absolutePath: { glob: "**/src/assets/captures/bump.png" }) {
childImageSharp {
gatsbyImageData(layout: FIXED, width: 900, quality: 100)
}
}
}
`)

return (
<ComponentTemplate
name="AreaBump"
Expand All @@ -115,6 +131,7 @@ const Bump = () => {
initialProperties={initialProperties}
propertiesMapper={mapper}
generateData={generateData}
image={image}
>
{(properties, data, theme, logAction) => {
return (
Expand Down

0 comments on commit c417b2b

Please sign in to comment.