We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5601ebc commit f26b786Copy full SHA for f26b786
src/theme/Root.tsx
@@ -1,13 +1,17 @@
1
import React from 'react';
2
import Berry from '../components/Berry';
3
import { useLocation } from '@docusaurus/router';
4
+import { useHomePageRoute } from '@docusaurus/theme-common/internal';
5
6
export default function Root({ children }: { children: React.ReactNode }) {
7
const location = useLocation();
8
+ const homePageRoute = useHomePageRoute();
9
+ const isHomePage = homePageRoute?.path === location.pathname;
10
+
11
return (
12
<>
13
{children}
- {location.pathname !== '/' && <Berry mode='popup' />}
14
+ {!isHomePage && <Berry mode='popup' />}
15
</>
16
);
17
}
0 commit comments