Browse Source

fix: npm run site (#23658)

pull/23645/head
Tom Xu 5 years ago
committed by GitHub
parent
commit
2325a4438d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      site/theme/template/Layout/Header/Navigation.tsx

5
site/theme/template/Layout/Header/Navigation.tsx

@ -32,6 +32,7 @@ export default ({
onLangChange,
onDirectionChange,
}: NavigationProps) => {
const [isGitee, setIsGitee] = React.useState(false);
const menuMode = isMobile ? 'inline' : 'horizontal';
const module = pathname.split('/').slice(0, -1).join('/');
@ -68,7 +69,9 @@ export default ({
);
}
const isGitee = document.location.host.indexOf('gitee') !== -1;
React.useEffect(() => {
setIsGitee(document.location.host.indexOf('gitee') !== -1);
}, []);
return (
<Menu

Loading…
Cancel
Save