diff --git a/layouts/BaseLayout.js b/layouts/BaseLayout.js index 8056895b..3544d86c 100644 --- a/layouts/BaseLayout.js +++ b/layouts/BaseLayout.js @@ -1,7 +1,6 @@ import CommonHead from '@/components/CommonHead' import FloatDarkModeButton from '@/components/FloatDarkModeButton' import Footer from '@/components/Footer' -import Header from '@/components/Header' import JumpToBottomButton from '@/components/JumpToBottomButton' import JumpToTopButton from '@/components/JumpToTopButton' import LoadingCover from '@/components/LoadingCover' @@ -9,7 +8,6 @@ import SideAreaRight from '@/components/SideAreaRight' import TopNav from '@/components/TopNav' import { useGlobal } from '@/lib/global' import throttle from 'lodash.throttle' -import { useRouter } from 'next/router' import PropTypes from 'prop-types' import React, { useCallback, useEffect, useRef } from 'react' /** @@ -33,6 +31,7 @@ const BaseLayout = ({ children, layout, fullWidth, + headerSlot, tags, meta, post, @@ -65,40 +64,29 @@ const BaseLayout = ({ }, []) const { onLoading } = useGlobal() const targetRef = useRef(null) - const router = useRouter() + console.log('header', headerSlot) return (<> - {/* 顶部导航栏 */} - {/* {router.asPath === '/as' && */} - - {/* } */} + - {/* 首页头图 */} - {router.asPath === '/' &&
} + <>{headerSlot} -
- - {/*
- -
*/} - -
+
+
{onLoading ? : <> {children} } -
- - - -
+ +