From 9c5627935a6bc37b8e50a07d035733494caa6cac Mon Sep 17 00:00:00 2001 From: Xevion Date: Thu, 16 Feb 2023 14:30:22 -0600 Subject: [PATCH] Comment out unused Card html, remove unused react-icons-all-files pkg, remove fuse.js --- package.json | 4 +--- src/pages/index.tsx | 12 +++--------- yarn.lock | 10 ---------- 3 files changed, 4 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index 3b0c1b9..77e3d77 100644 --- a/package.json +++ b/package.json @@ -10,10 +10,8 @@ }, "dependencies": { "@loadable/component": "^5.15.3", - "@react-icons/all-files": "^4.1.0", "babel-plugin-codegen": "^4.1.5", "babel-plugin-macros": "^3.1.0", - "fuse.js": "^6.6.2", "next": "13.1.6", "react": "18.2.0", "react-dom": "18.2.0", @@ -28,8 +26,8 @@ "@types/node": "^18.11.18", "@types/prettier": "^2.7.2", "@types/react": "^18.0.26", - "@types/react-no-ssr": "^1.1.3", "@types/react-dom": "^18.0.10", + "@types/react-no-ssr": "^1.1.3", "@typescript-eslint/eslint-plugin": "^5.47.1", "@typescript-eslint/parser": "^5.47.1", "autoprefixer": "^10.4.7", diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 836b1da..60422cf 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,18 +1,14 @@ import {type NextPage} from "next"; import Head from "next/head"; -import Card from "../components/Card"; // @ts-ignore import iconList from "@utils/iconList"; import {useEffect, useMemo, useState} from "react"; import {useDebounce} from "usehooks-ts"; -// import Fuse from "fuse.js"; import {AiOutlineLoading3Quarters} from "react-icons/ai"; import IconCatalog from "@components/render/IconCatalog"; import NoSSR from 'react-no-ssr'; const icons = iconList as { id: string, setId: string }[]; -// const fuse = new Fuse(icons, {keys: ["id", "setId"], threshold: 0.2}) -const maximumResults = 10000; const Home: NextPage = () => { const [query, setQuery] = useState(""); @@ -60,9 +56,7 @@ const Home: NextPage = () => { {showLoading ? : (query.length == 0 ? icons.length - : (filtered.length === maximumResults - ? `${maximumResults}+` - : filtered.length))} + : filtered.length)} { timing !== 0 @@ -74,7 +68,7 @@ const Home: NextPage = () => {
{catalog}
- + */} ); diff --git a/yarn.lock b/yarn.lock index ed67976..6dfe8d2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -183,11 +183,6 @@ tiny-glob "^0.2.9" tslib "^2.4.0" -"@react-icons/all-files@^4.1.0": - version "4.1.0" - resolved "https://registry.yarnpkg.com/@react-icons/all-files/-/all-files-4.1.0.tgz#477284873a0821928224b6fc84c62d2534d6650b" - integrity sha512-hxBI2UOuVaI3O/BhQfhtb4kcGn9ft12RWAFVMUeNjqqhLsHvFtzIkFaptBJpFDANTKoDfdVoHTKZDlwKCACbMQ== - "@rushstack/eslint-patch@^1.1.3": version "1.2.0" resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.2.0.tgz#8be36a1f66f3265389e90b5f9c9962146758f728" @@ -1266,11 +1261,6 @@ functions-have-names@^1.2.2: resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== -fuse.js@^6.6.2: - version "6.6.2" - resolved "https://registry.yarnpkg.com/fuse.js/-/fuse.js-6.6.2.tgz#fe463fed4b98c0226ac3da2856a415576dc9a111" - integrity sha512-cJaJkxCCxC8qIIcPBF9yGxY0W/tVZS3uEISDxhYIdtk8OL93pe+6Zj7LjCqVV4dzbqcriOZ+kQ/NE4RXZHsIGA== - get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.0.tgz#7ad1dc0535f3a2904bba075772763e5051f6d05f"