Li_0225
This commit is contained in:
parent
287bf31d0e
commit
ead1d926c6
|
@ -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 (
|
||||
<section className="py-32 relative overflow-hidden">
|
||||
<div className="max-w-screen-2xl mx-auto px-4 relative">
|
||||
|
@ -67,7 +63,7 @@ const CategorySection = () => {
|
|||
</div>
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
|
||||
{isLoading ? (
|
||||
<Skeleton></Skeleton>
|
||||
<Skeleton paragraph={{rows:4}}></Skeleton>
|
||||
) : (
|
||||
displayedCategories.map((category, index) => {
|
||||
const categoryColor = stringToColor(category.name);
|
||||
|
|
|
@ -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<CoursesSectionProps> = ({
|
|||
description,
|
||||
initialVisibleCoursesCount = 8,
|
||||
}) => {
|
||||
const navigate = useNavigate();
|
||||
const [selectedCategory, setSelectedCategory] = useState<string>("全部");
|
||||
const gateGory: GetTaxonomyProps = useGetTaxonomy({
|
||||
type: TaxonomySlug.CATEGORY,
|
||||
|
|
Loading…
Reference in New Issue