Skip to content

Commit 4a29fc7

Browse files
Implement SEO component
1 parent b32b712 commit 4a29fc7

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

web/components/SEO.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ import PropTypes from "prop-types"
33
import { Helmet } from "react-helmet"
44
// import { useLocation } from "@reach/router"
55
import { useStaticQuery, graphql } from "gatsby"
6+
import Index from "../src/pages"
67

8+
// TODO: use this component on Index.js
79
const SEO = ({ title, description, image }) => {
810
// const { pathname } = useLocation()
911
const { site } = useStaticQuery(query)

web/src/pages/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React, { useState, useEffect } from 'react'
22
import { graphql } from 'gatsby'
33
import styled from 'styled-components'
44
import throttle from 'lodash.throttle'
5+
import SEO from '../components/seo'
56
import Layout from '../../components/layout'
67
import Footer from '../../components/Footer'
78
import ToC from '../../components/TableOfContents'
@@ -105,6 +106,7 @@ export default function Index({ data }) {
105106
return (
106107
<div>
107108
<Layout id="top-of-page">
109+
<SEO />
108110
<ToC data={data.allSanitySection.edges} />
109111

110112
{data.allSanitySection.edges.map(({node}) => {

0 commit comments

Comments
 (0)