From bfc2bb1501faf23d94860f39e11cf81e8542c4f6 Mon Sep 17 00:00:00 2001 From: Gregor Lohaus Date: Mon, 30 Mar 2026 18:54:19 +0200 Subject: [PATCH] reset gsap provider to music page version --- src/app/_providers/GsapProvicer.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/_providers/GsapProvicer.tsx b/src/app/_providers/GsapProvicer.tsx index b4d17c4..5f031c3 100644 --- a/src/app/_providers/GsapProvicer.tsx +++ b/src/app/_providers/GsapProvicer.tsx @@ -2,13 +2,12 @@ import { useGSAP } from '@gsap/react' import gsap from 'gsap' import { SplitText } from 'gsap/SplitText' -import { ScrollTrigger, GSDevTools } from 'gsap/all' +import { ScrollTrigger } from 'gsap/all' import { createContext, useCallback, useContext, useEffect, useRef, type ReactNode } from 'react' gsap.registerPlugin(useGSAP) gsap.registerPlugin(ScrollTrigger) gsap.registerPlugin(SplitText) -gsap.registerPlugin(GSDevTools) const GsapContext = createContext<{ addAnimation: ( animation: gsap.core.TimelineChild, @@ -23,7 +22,7 @@ export function useGsapContext() { return useContext(GsapContext) } -export const useTimeLine = (dep:any,all?:boolean) => { +export const useTimeLine = (dep?:any,all?:boolean) => { const gsapContext = useGsapContext() useEffect(() => { if (dep instanceof Array && all) { @@ -67,6 +66,7 @@ export default function GsapProvider({ children }: { children: ReactNode }) { tl.current?.add(animation, position); },[]) const resetTimeline = useCallback(() => { + console.log('resetting timeline') tl.current?.kill() tl.current?.revert() ScrollTrigger.getAll().forEach(st => st.kill())