@@ -9,7 +9,7 @@ import { LocaleProvider } from "gatsby-theme-i18n"
9
9
import { lightTheme , darkTheme } from "../theme"
10
10
11
11
import Footer from "./Footer"
12
- import VisuallyHidden from "./VisuallyHidden "
12
+ import ZenMode from "./ZenMode "
13
13
import Nav from "./Nav"
14
14
import SideNav from "./SideNav"
15
15
import SideNavMobile from "./SideNavMobile"
@@ -148,43 +148,41 @@ const Layout: React.FC<IProps> = ({
148
148
< IntlProvider locale = { locale ! } key = { locale } messages = { messages } >
149
149
< ApolloProvider client = { client } >
150
150
< ThemeProvider theme = { theme } >
151
- < SkipLink hrefId = "#main-content" />
152
- < TranslationBanner
153
- shouldShow = { shouldShowTranslationBanner }
154
- isPageContentEnglish = { isPageContentEnglish }
155
- isPageRightToLeft = { isPageRightToLeft }
156
- originalPagePath = { pageContext . originalPath ! }
157
- />
158
- < TranslationBannerLegal
159
- shouldShow = { isLegal }
160
- isPageRightToLeft = { isPageRightToLeft }
161
- originalPagePath = { pageContext . originalPath ! }
162
- />
163
- < ContentContainer >
164
- < VisuallyHidden isHidden = { isZenMode } >
165
- < Nav path = { path } />
166
- { shouldShowSideNav && < SideNavMobile path = { path } /> }
167
- </ VisuallyHidden >
168
- < SkipLinkAnchor id = "main-content" />
169
- < MainContainer >
170
- { shouldShowSideNav && (
171
- < VisuallyHidden isHidden = { isZenMode } >
172
- < SideNav path = { path } />
173
- </ VisuallyHidden >
174
- ) }
175
- < MainContent >
176
- < ZenModeContext . Provider
177
- value = { { isZenMode, handleZenModeChange } }
178
- >
151
+ < ZenModeContext . Provider value = { { isZenMode, handleZenModeChange } } >
152
+ < SkipLink hrefId = "#main-content" />
153
+ < TranslationBanner
154
+ shouldShow = { shouldShowTranslationBanner }
155
+ isPageContentEnglish = { isPageContentEnglish }
156
+ isPageRightToLeft = { isPageRightToLeft }
157
+ originalPagePath = { pageContext . originalPath ! }
158
+ />
159
+ < TranslationBannerLegal
160
+ shouldShow = { isLegal }
161
+ isPageRightToLeft = { isPageRightToLeft }
162
+ originalPagePath = { pageContext . originalPath ! }
163
+ />
164
+ < ContentContainer >
165
+ < ZenMode >
166
+ < Nav path = { path } />
167
+ { shouldShowSideNav && < SideNavMobile path = { path } /> }
168
+ </ ZenMode >
169
+ < SkipLinkAnchor id = "main-content" />
170
+ < MainContainer >
171
+ { shouldShowSideNav && (
172
+ < ZenMode >
173
+ < SideNav path = { path } />
174
+ </ ZenMode >
175
+ ) }
176
+ < MainContent >
179
177
< Main > { children } </ Main >
180
- </ ZenModeContext . Provider >
181
- </ MainContent >
182
- </ MainContainer >
183
- < VisuallyHidden isHidden = { isZenMode } >
184
- < Footer / >
185
- </ VisuallyHidden >
186
- < FeedbackWidget / >
187
- </ ContentContainer >
178
+ </ MainContent >
179
+ </ MainContainer >
180
+ < ZenMode >
181
+ < Footer / >
182
+ </ ZenMode >
183
+ < FeedbackWidget / >
184
+ </ ContentContainer >
185
+ </ ZenModeContext . Provider >
188
186
</ ThemeProvider >
189
187
</ ApolloProvider >
190
188
</ IntlProvider >
0 commit comments