diff --git a/site/theme/template/Layout/Header/Navigation.tsx b/site/theme/template/Layout/Header/Navigation.tsx index e38fe48c7cf6..9ffc3cb8c1e6 100644 --- a/site/theme/template/Layout/Header/Navigation.tsx +++ b/site/theme/template/Layout/Header/Navigation.tsx @@ -33,7 +33,6 @@ export default ({ onLangChange, onDirectionChange, }: NavigationProps) => { - const [isGitee, setIsGitee] = React.useState(false); const menuMode = isMobile ? 'inline' : 'horizontal'; const module = pathname.split('/').slice(0, -1).join('/'); @@ -70,10 +69,6 @@ export default ({ ); } - React.useEffect(() => { - setIsGitee(document.location.host.indexOf('gitee') !== -1); - }, []); - return ( )} - {isZhCN && !isGitee && ( + {isZhCN && typeof window !== 'undefined' && window.location.host.indexOf('gitee') === -1 && ( 国内镜像