@@ -30,10 +30,10 @@ import Link from 'docs/src/modules/components/Link';
30
30
import AppDrawer from 'docs/src/modules/components/AppDrawer' ;
31
31
import Notifications from 'docs/src/modules/components/Notifications' ;
32
32
import MarkdownLinks from 'docs/src/modules/components/MarkdownLinks' ;
33
- import usePageTitle from 'docs/src/modules/components/usePageTitle' ;
34
33
import { LANGUAGES_LABEL } from 'docs/src/modules/constants' ;
35
34
import { pathnameToLanguage } from 'docs/src/modules/utils/helpers' ;
36
35
import { useChangeTheme } from 'docs/src/modules/components/ThemeContext' ;
36
+ import PageContext from 'docs/src/modules/components/PageContext' ;
37
37
38
38
const LOCALES = { zh : 'zh-CN' , pt : 'pt-BR' , es : 'es-ES' } ;
39
39
const CROWDIN_ROOT_URL = 'https://translate.material-ui.com/project/material-ui-docs/' ;
@@ -137,11 +137,6 @@ const styles = theme => ({
137
137
display : 'none' ,
138
138
} ,
139
139
} ,
140
- '@global' : {
141
- '#main-content' : {
142
- outline : 0 ,
143
- } ,
144
- } ,
145
140
} ) ;
146
141
147
142
function AppFrame ( props ) {
@@ -183,13 +178,13 @@ function AppFrame(props) {
183
178
184
179
const router = useRouter ( ) ;
185
180
const { canonical } = pathnameToLanguage ( Router2 . _rewriteUrlForNextExport ( router . asPath ) ) ;
186
- const title = usePageTitle ( { t } ) ;
181
+ const { activePage } = React . useContext ( PageContext ) ;
187
182
188
183
let disablePermanent = false ;
189
184
let navIconClassName = '' ;
190
185
let appBarClassName = classes . appBar ;
191
186
192
- if ( title === null ) {
187
+ if ( activePage . title === false ) {
193
188
// home route, don't shift app bar or dock drawer
194
189
disablePermanent = true ;
195
190
appBarClassName += ` ${ classes . appBarHome } ` ;
@@ -337,7 +332,7 @@ function AppFrame(props) {
337
332
</ Toolbar >
338
333
</ AppBar >
339
334
< AppDrawer
340
- className = { classes . drawer }
335
+ className = { disablePermanent ? '' : classes . drawer }
341
336
disablePermanent = { disablePermanent }
342
337
onClose = { handleDrawerClose }
343
338
onOpen = { handleDrawerOpen }
0 commit comments