@@ -8,8 +8,7 @@ import { ReactElement, useCallback, useMemo } from 'react'
8
8
import { useSet } from 'react-use'
9
9
import { ThemeUICSSObject } from 'theme-ui'
10
10
11
- import { Divider , DividerProps , Flex , Icon , Spacing , useI18n } from '@edgeandnode/gds'
12
- import { NPSForm } from '@edgeandnode/go'
11
+ import { Divider , DividerProps , Flex , Spacing , useI18n } from '@edgeandnode/gds'
13
12
14
13
import {
15
14
Callout ,
@@ -65,16 +64,14 @@ const mdxStyles: ThemeUICSSObject = {
65
64
66
65
export { Heading , Image , LinkInline , Paragraph }
67
66
68
- export default function NextraLayout ( { children, pageOpts, pageProps } : NextraThemeLayoutProps ) : ReactElement {
67
+ export default function NextraLayout ( { children, pageOpts } : NextraThemeLayoutProps ) : ReactElement {
69
68
const { frontMatter, filePath, pageMap, headings, title } = pageOpts
70
69
const { locale, defaultLocale } = useI18n < any > ( )
71
70
const fsPath = useFSRoute ( )
72
71
73
72
const args = useMemo ( ( ) => {
74
73
const result = normalizePages ( {
75
74
list : pageMap ,
76
- locale,
77
- defaultLocale : defaultLocale ,
78
75
route : fsPath ,
79
76
} )
80
77
@@ -98,7 +95,7 @@ export default function NextraLayout({ children, pageOpts, pageProps }: NextraTh
98
95
( item ) => item . type !== 'separator' && item . type !== 'heading' && item . route !== '' ,
99
96
) ,
100
97
}
101
- } , [ defaultLocale , fsPath , locale , pageMap ] )
98
+ } , [ fsPath , pageMap ] )
102
99
103
100
// Provide `markOutlineItem` to the `DocumentContext` so child `Heading` components can mark outline items as "in or above view" or not
104
101
const [
@@ -140,6 +137,7 @@ export default function NextraLayout({ children, pageOpts, pageProps }: NextraTh
140
137
}
141
138
142
139
return (
140
+ // @ts -expect-error TODO: pageProps
143
141
< NavContext . Provider value = { { filePath : pageProps . remoteFilePath || filePath , ...args } } >
144
142
< DocumentContext . Provider value = { { frontMatter, headings, markOutlineItem, highlightedOutlineItemId } } >
145
143
< NextSeo { ...seo } />
0 commit comments