diff --git a/components/home/MaterialGrid.tsx b/components/home/MaterialGrid.tsx index 896b037..a722667 100644 --- a/components/home/MaterialGrid.tsx +++ b/components/home/MaterialGrid.tsx @@ -1,12 +1,8 @@ 'use client' -import React, { useRef } from 'react' -import gsap from 'gsap' -import { useGSAP } from '@gsap/react' +import React from 'react' import MaterialCard, { Material } from './MaterialCard' -gsap.registerPlugin(useGSAP) - // 用户会话类型 interface UserSession { id: string @@ -49,33 +45,8 @@ interface MaterialGridProps { } function MaterialGridSkeleton() { - const rootRef = useRef(null) - - useGSAP(() => { - if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') return - - const motion = gsap.matchMedia() - motion.add('(prefers-reduced-motion: no-preference)', () => { - gsap.fromTo( - '[data-skeleton-block]', - { opacity: 0.42 }, - { - opacity: 0.92, - duration: 1.15, - ease: 'sine.inOut', - yoyo: true, - repeat: -1, - stagger: { each: 0.08, from: 'start' }, - }, - ) - }) - - return () => motion.revert() - }, { scope: rootRef }) - return (
-
+
-
-
+
+
-
-
+
+