diff --git a/themes/hexo/components/ArticleRecommend.js b/themes/hexo/components/ArticleRecommend.js index a3a40b7d..0bbcd937 100644 --- a/themes/hexo/components/ArticleRecommend.js +++ b/themes/hexo/components/ArticleRecommend.js @@ -1,9 +1,9 @@ -import Link from 'next/link' -import CONFIG from '../config' +import LazyImage from '@/components/LazyImage' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import LazyImage from '@/components/LazyImage' import { checkContainHttp, sliceUrlFromHttp } from '@/lib/utils' +import Link from 'next/link' +import CONFIG from '../config' /** * 关联推荐文章 @@ -13,50 +13,52 @@ import { checkContainHttp, sliceUrlFromHttp } from '@/lib/utils' export default function ArticleRecommend({ recommendPosts, siteInfo }) { const { locale } = useGlobal() - if ( - !siteConfig('HEXO_ARTICLE_RECOMMEND', null, CONFIG) || - !recommendPosts || - recommendPosts.length === 0 - ) { + if (!siteConfig('HEXO_ARTICLE_RECOMMEND', null, CONFIG) || !recommendPosts || recommendPosts.length === 0) { return <>> } return ( -