mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-16 09:11:38 +00:00
Remove useless dependencies
This commit is contained in:
@ -1,22 +1,8 @@
|
||||
import useMounted from 'lib/hooks/useMounted';
|
||||
import { useEffect } from 'react';
|
||||
import tocbot from 'tocbot';
|
||||
|
||||
const SlideToc = () => {
|
||||
const { mounted } = useMounted();
|
||||
|
||||
useEffect(() => {
|
||||
// Waiting the right time.
|
||||
mounted &&
|
||||
tocbot.init({
|
||||
tocSelector: '.toc',
|
||||
contentSelector: '#post-content',
|
||||
headingSelector: 'h1, h2, h3',
|
||||
});
|
||||
|
||||
return () => tocbot.destroy();
|
||||
}, [mounted]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="flex justify-end">
|
||||
|
@ -16,9 +16,6 @@
|
||||
"@docsearch/react": "3",
|
||||
"@giscus/react": "^2.2.0",
|
||||
"@mapbox/rehype-prism": "^0.8.0",
|
||||
"@mdx-js/loader": "^2.1.2",
|
||||
"@mdx-js/react": "^2.1.2",
|
||||
"@next/mdx": "^12.2.4",
|
||||
"algoliasearch": "^4.14.2",
|
||||
"classnames": "^2.3.1",
|
||||
"dayjs": "^1.11.4",
|
||||
@ -34,8 +31,7 @@
|
||||
"rehype-slug": "^5.0.1",
|
||||
"remark-frontmatter": "^4.0.1",
|
||||
"remark-gfm": "^3.0.1",
|
||||
"sharp": "^0.30.7",
|
||||
"tocbot": "^4.18.2"
|
||||
"sharp": "^0.30.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@testing-library/jest-dom": "^5.16.5",
|
||||
@ -55,4 +51,4 @@
|
||||
"tailwindcss": "^3.1.8",
|
||||
"typescript": "4.7.4"
|
||||
}
|
||||
}
|
||||
}
|
@ -6,7 +6,7 @@ import { GetStaticPaths, GetStaticProps, InferGetStaticPropsType } from 'next';
|
||||
import dynamic from 'next/dynamic';
|
||||
import Image from 'next/image';
|
||||
import Link from 'next/link';
|
||||
import avatar from 'assets/images/img/avatar.svg';
|
||||
import avatar from 'public/images/img/avatar.svg';
|
||||
import { ReactElement } from 'react';
|
||||
|
||||
const MainLayout = dynamic(() => import('layouts/MainLayout'));
|
||||
|
31
yarn.lock
31
yarn.lock
@ -1250,14 +1250,6 @@
|
||||
refractor "^3.4.0"
|
||||
unist-util-visit "^2.0.3"
|
||||
|
||||
"@mdx-js/loader@^2.1.2":
|
||||
version "2.1.2"
|
||||
resolved "https://registry.npmmirror.com/@mdx-js/loader/-/loader-2.1.2.tgz#fe7631bbef1e6546f4289f7adaef60083c22063a"
|
||||
integrity sha512-P7CWhrqE5rZ3ewBngZ9t/zQPbSq42iuty78K3zJ8Bl518qnOX1d106c+n7I/zHODPAmw9JfYMQdbv9WrrHa0DA==
|
||||
dependencies:
|
||||
"@mdx-js/mdx" "^2.0.0"
|
||||
source-map "^0.7.0"
|
||||
|
||||
"@mdx-js/mdx@^2.0.0":
|
||||
version "2.1.0"
|
||||
resolved "https://registry.npmmirror.com/@mdx-js/mdx/-/mdx-2.1.0.tgz#a984cee27a378619a82d193288031a7b83a54b26"
|
||||
@ -1289,14 +1281,6 @@
|
||||
"@types/mdx" "^2.0.0"
|
||||
"@types/react" ">=16"
|
||||
|
||||
"@mdx-js/react@^2.1.2":
|
||||
version "2.1.2"
|
||||
resolved "https://registry.npmmirror.com/@mdx-js/react/-/react-2.1.2.tgz#02972f170cd3ad9113ce448245c5f636bb3e750d"
|
||||
integrity sha512-52e3DTJBrjsw3U51ZCdZ3N1IBaqnbzLIngCSXpKtiYiGr7PIqp3/P/+kym0MPTwBL/y9ZBmCieD8FyrXuEDrRw==
|
||||
dependencies:
|
||||
"@types/mdx" "^2.0.0"
|
||||
"@types/react" ">=16"
|
||||
|
||||
"@next/env@12.2.4":
|
||||
version "12.2.4"
|
||||
resolved "https://registry.yarnpkg.com/@next/env/-/env-12.2.4.tgz#5ba9bed9970be4113773233148b4539691bfc4fe"
|
||||
@ -1309,11 +1293,6 @@
|
||||
dependencies:
|
||||
glob "7.1.7"
|
||||
|
||||
"@next/mdx@^12.2.4":
|
||||
version "12.2.4"
|
||||
resolved "https://registry.yarnpkg.com/@next/mdx/-/mdx-12.2.4.tgz#a94d2e6eef91a4da1298e3a802563aad66cd7826"
|
||||
integrity sha512-3Bj8gS6T0ZeAzoZQ66oNIXpgWeaYyiHB/mb8pJwDkgZiCUpaacxkfZ5HFqMdndAMJSCkKWcjhWaoGo7pUP88pg==
|
||||
|
||||
"@next/swc-android-arm-eabi@12.2.4":
|
||||
version "12.2.4"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.2.4.tgz#5c7f508f93baec810c96bf60128b7c1f2109bee2"
|
||||
@ -7804,11 +7783,6 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1:
|
||||
resolved "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
|
||||
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
|
||||
|
||||
source-map@^0.7.0:
|
||||
version "0.7.3"
|
||||
resolved "https://registry.npmmirror.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383"
|
||||
integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==
|
||||
|
||||
space-separated-tokens@^1.0.0:
|
||||
version "1.1.5"
|
||||
resolved "https://registry.npmmirror.com/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz#85f32c3d10d9682007e917414ddc5c26d1aa6899"
|
||||
@ -8173,11 +8147,6 @@ to-regex-range@^5.0.1:
|
||||
dependencies:
|
||||
is-number "^7.0.0"
|
||||
|
||||
tocbot@^4.18.2:
|
||||
version "4.18.2"
|
||||
resolved "https://registry.npmmirror.com/tocbot/-/tocbot-4.18.2.tgz#e98bb4120fae02f0e4a01d3acff03f3db2ba3ad9"
|
||||
integrity sha512-bWUfEYQZ4oFgT+qZYvzlTgbsTmA645ApHbo1iRaOBUeFfy5IpctgAQQjCXbPZy+4RDZ1JJYlIBgoApZMzMaYog==
|
||||
|
||||
tough-cookie@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.npmmirror.com/tough-cookie/-/tough-cookie-4.0.0.tgz#d822234eeca882f991f0f908824ad2622ddbece4"
|
||||
|
Reference in New Issue
Block a user