Got some basic pokemon nodes working
This commit is contained in:
23
src/pages/{pokemon.name}.js
Normal file
23
src/pages/{pokemon.name}.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import Layout from '../components/layout'
|
||||
import { graphql } from 'gatsby'
|
||||
import * as React from 'react'
|
||||
|
||||
const PokemonPage = ({data}) => {
|
||||
return (
|
||||
<Layout pageTitle="Super Cool Blog Posts">
|
||||
<p>This is a page about {data.pokemon.name}</p>
|
||||
</Layout>
|
||||
)
|
||||
}
|
||||
|
||||
export const query = graphql`
|
||||
query ($name: String) {
|
||||
pokemon(name: {eq: $name}) {
|
||||
id
|
||||
name
|
||||
type
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
export default PokemonPage
|
||||
Reference in New Issue
Block a user