1- import React , { useState , ReactNode , Dispatch } from 'react'
1+ import { Box , CodeStyle , Container , ThemeProvider } from '@committed/components'
2+ import { Content , Header as LayoutHeader , Nav , Root } from '@committed/layout'
3+ import { navigate } from 'gatsby'
4+ import React , { Dispatch , ReactNode , useState } from 'react'
5+ import { useHotkeys } from 'react-hotkeys-hook'
26import 'typeface-dosis'
37import 'typeface-lato'
4- import { Header } from './Header'
5- import { Footer } from './Footer'
6- import { Sidebar } from './Sidebar'
78import { PageContext } from '../types'
9+ import { Footer } from './Footer'
10+ import { Header } from './Header'
811import { PreviousNext } from './PreviousNext'
912import { SEO , SEOProps } from './SEO'
10- import { navigate } from 'gatsby'
11- import { useHotkeys } from 'react-hotkeys-hook'
12- import { Root , Header as LayoutHeader , Nav , Content } from '@committed/layout'
13- import { ThemeProvider , CodeStyle , Container , Box } from '@committed/components'
13+ import { Sidebar } from './Sidebar'
1414
1515export interface LayoutProps extends SEOProps {
1616 id : string
@@ -33,7 +33,6 @@ export const Layout = ({
3333 pageContext = { id : 'default' } ,
3434 children,
3535 location = { } ,
36- title,
3736 ...props
3837} : LayoutProps ) => {
3938 const [ collapsed , setCollapsed ] = useState ( ( location && location . state ) || { } )
@@ -68,7 +67,9 @@ export const Layout = ({
6867 }
6968 } }
7069 >
71- < SEO title = { title } { ...props } />
70+ { pageContext . current && pageContext . current . title && (
71+ < SEO title = { pageContext . current . title } { ...props } />
72+ ) }
7273 < Root
7374 style = { { minHeight : '100vh' } }
7475 config = { {
0 commit comments