File tree 1 file changed +17
-0
lines changed
website/src/pages/area-bump
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react'
2
2
import range from 'lodash/range'
3
3
import random from 'lodash/random'
4
+ import { useStaticQuery , graphql } from 'gatsby'
5
+ import { getSrc } from 'gatsby-plugin-image'
4
6
import { patternDotsDef , patternLinesDef } from '@nivo/core'
5
7
import { ResponsiveAreaBump , AreaBumpDefaultProps } from '@nivo/bump'
6
8
import { ComponentTemplate } from '../../components/components/ComponentTemplate'
@@ -103,6 +105,20 @@ const initialProperties = {
103
105
}
104
106
105
107
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
+
106
122
return (
107
123
< ComponentTemplate
108
124
name = "AreaBump"
@@ -115,6 +131,7 @@ const Bump = () => {
115
131
initialProperties = { initialProperties }
116
132
propertiesMapper = { mapper }
117
133
generateData = { generateData }
134
+ image = { image }
118
135
>
119
136
{ ( properties , data , theme , logAction ) => {
120
137
return (
You can’t perform that action at this time.
0 commit comments