diff --git a/themes/next/components/ShareBar.js b/themes/next/components/ShareBar.js index 2f174b13..c595da13 100644 --- a/themes/next/components/ShareBar.js +++ b/themes/next/components/ShareBar.js @@ -8,17 +8,17 @@ import { useGlobal } from '@/lib/global' import CONFIG_NEXT from '../config_next' const ShareBar = ({ post }) => { + const router = useRouter() + const [qrCodeShow, setQrCodeShow] = React.useState(false) + const { locale } = useGlobal() if (!CONFIG_NEXT.ARTICLE_SHARE) { return <>> } - const router = useRouter() const shareUrl = BLOG.LINK + router.asPath // 二维码悬浮 - const [qrCodeShow, setQrCodeShow] = React.useState(false) const btnRef = React.createRef() const popoverRef = React.createRef() - const { locale } = useGlobal() const openPopover = () => { createPopper(btnRef.current, popoverRef.current, { @@ -57,7 +57,7 @@ const ShareBar = ({ post }) => {