From ead1d926c6170f1a7731105207c2451a783f7540 Mon Sep 17 00:00:00 2001 From: Li1304553726 <1304553726@qq.com> Date: Tue, 25 Feb 2025 20:34:51 +0800 Subject: [PATCH] Li_0225 --- apps/web/src/app/main/home/components/CategorySection.tsx | 6 +----- apps/web/src/app/main/home/components/CoursesSection.tsx | 5 +---- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/apps/web/src/app/main/home/components/CategorySection.tsx b/apps/web/src/app/main/home/components/CategorySection.tsx index 9584193..1c0b8a6 100755 --- a/apps/web/src/app/main/home/components/CategorySection.tsx +++ b/apps/web/src/app/main/home/components/CategorySection.tsx @@ -2,8 +2,6 @@ import React, { useState, useCallback, useEffect, useMemo } from "react"; import { Typography, Button, Spin, Skeleton } from "antd"; import { stringToColor, TaxonomySlug, TermDto } from "@nice/common"; import { api } from "@nice/client"; -import { ControlOutlined } from "@ant-design/icons"; -import { useNavigate, useSearchParams } from "react-router-dom"; import LookForMore from "./LookForMore"; import CategorySectionCard from "./CategorySectionCard"; @@ -50,8 +48,6 @@ const CategorySection = () => { setHoveredIndex(null); }, []); - const navigate = useNavigate(); - return (
@@ -67,7 +63,7 @@ const CategorySection = () => {
{isLoading ? ( - + ) : ( displayedCategories.map((category, index) => { const categoryColor = stringToColor(category.name); diff --git a/apps/web/src/app/main/home/components/CoursesSection.tsx b/apps/web/src/app/main/home/components/CoursesSection.tsx index bc2e5a4..6bd8858 100755 --- a/apps/web/src/app/main/home/components/CoursesSection.tsx +++ b/apps/web/src/app/main/home/components/CoursesSection.tsx @@ -1,7 +1,5 @@ import React, { useState, useMemo } from "react"; -import { useNavigate } from "react-router-dom"; -import { Button, Typography, Skeleton } from "antd"; -import { ArrowRightOutlined } from "@ant-design/icons"; +import { Typography, Skeleton } from "antd"; import { TaxonomySlug, TermDto } from "@nice/common"; import { api } from "@nice/client"; import { CoursesSectionTag } from "./CoursesSectionTag"; @@ -40,7 +38,6 @@ const CoursesSection: React.FC = ({ description, initialVisibleCoursesCount = 8, }) => { - const navigate = useNavigate(); const [selectedCategory, setSelectedCategory] = useState("全部"); const gateGory: GetTaxonomyProps = useGetTaxonomy({ type: TaxonomySlug.CATEGORY,