diff --git a/components/SideArea.js b/components/SideArea.js index 8af1c25d..9d9e4473 100644 --- a/components/SideArea.js +++ b/components/SideArea.js @@ -1,4 +1,4 @@ -import React, { useEffect } from 'react' +import React from 'react' import MenuButtonGroup from '@/components/MenuButtonGroup' import InfoCard from '@/components/InfoCard' import TagGroups from '@/components/TagGroups' @@ -10,7 +10,6 @@ import { useGlobal } from '@/lib/global' import Toc from '@/components/Toc' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faAngleDoubleRight, faArchive, faTags, faThList } from '@fortawesome/free-solid-svg-icons' -const adsInit = false /** * 侧边平铺 diff --git a/lib/global.js b/lib/global.js index c37e5675..5022adfd 100644 --- a/lib/global.js +++ b/lib/global.js @@ -119,6 +119,7 @@ function initGoogleAdsense () { if (newAdsCount > 0) { for (let i = 0; i <= newAdsCount; i++) { try { + // eslint-disable-next-line no-undef (adsbygoogle = window.adsbygoogle || []).push({}) } catch (e) {