@@ -13,7 +13,6 @@ import VersionDropdown from '../VersionDropdown';
13
13
import useStickyTopValues from '../../hooks/useStickyTopValues' ;
14
14
import { theme } from '../../theme/docsTheme' ;
15
15
import { formatText } from '../../utils/format-text' ;
16
- import { baseUrl } from '../../utils/base-url' ;
17
16
import { TocContext } from '../../context/toc-context' ;
18
17
import { VersionContext } from '../../context/version-context' ;
19
18
import useSnootyMetadata from '../../utils/use-snooty-metadata' ;
@@ -23,11 +22,11 @@ import GuidesTOCTree from './GuidesTOCTree';
23
22
import IA from './IA' ;
24
23
import IATransition from './IATransition' ;
25
24
import ProductsList from './ProductsList' ;
26
- import SidenavBackButton from './SidenavBackButton' ;
27
25
import { SidenavContext } from './sidenav-context' ;
28
26
import SidenavMobileTransition from './SidenavMobileTransition' ;
29
27
import Toctree from './Toctree' ;
30
- import { sideNavItemBasePadding , sideNavItemFontSize } from './styles/sideNavItem' ;
28
+ import { sideNavItemBasePadding , sideNavItemFontSize , titleStyle } from './styles/sideNavItem' ;
29
+ import DocsHomeButton from './DocsHomeButton' ;
31
30
32
31
const SIDENAV_WIDTH = 268 ;
33
32
@@ -77,21 +76,6 @@ const sideNavStyling = ({ hideMobile, isCollapsed }) => LeafyCSS`
77
76
78
77
` ;
79
78
80
- const titleStyle = LeafyCSS `
81
- color : ${ palette . gray . dark3 } ;
82
- font-size : ${ theme . fontSize . small } ;
83
- font-weight : bold;
84
- line-height : 20px ;
85
- text-transform : none;
86
- : hover {
87
- background-color : inherit;
88
-
89
- & : after , span : after {
90
- display : none;
91
- }
92
- }
93
- ` ;
94
-
95
79
// Prevent content scrolling when the side nav is open on mobile and tablet screen sizes
96
80
const disableScroll = ( shouldDisableScroll ) => css `
97
81
body {
@@ -260,21 +244,8 @@ const Sidenav = ({ chapters, guides, page, pageTitle, repoBranches, siteTitle, s
260
244
< IATransition back = { back } hasIA = { ! ! ia } slug = { slug } isMobile = { isMobile } >
261
245
< NavTopContainer >
262
246
< ArtificialPadding />
263
- < SideNavItem className = { cx ( titleStyle , sideNavItemBasePadding ) } as = { Link } to = { baseUrl ( ) } >
264
- MongoDB Documentation
265
- </ SideNavItem >
247
+ < DocsHomeButton />
266
248
< Border />
267
- < SidenavBackButton
268
- handleClick = { ( ) => {
269
- setBack ( true ) ;
270
- hideMobileSidenav ( ) ;
271
- } }
272
- project = { project }
273
- currentSlug = { slug }
274
- target = { isGuidesTemplate ? '/' : '' }
275
- titleOverride = { isGuidesTemplate ? siteTitle : '' }
276
- eol = { eol }
277
- />
278
249
{ ia && (
279
250
< IA
280
251
header = { ! isLanding && < span className = { cx ( [ titleStyle ] ) } > { formatText ( pageTitle ) } </ span > }
0 commit comments