scroll triggers

This commit is contained in:
2026-03-14 18:35:04 +01:00
parent b5291caa6e
commit 57978d81e1
6 changed files with 102 additions and 66 deletions

View File

@@ -1,6 +1,6 @@
'use client'
import { useGSAP } from "@gsap/react";
import { useGsapContext } from "../_providers/GsapProvicer";
import { useGsapContext,useTimeLine } from "../_providers/GsapProvicer";
import { trpc } from "../_trpc/Client";
import { useRef } from "react";
import { SidebarContent, SidebarProvider, Sidebar } from "~/components/ui/sidebar";
@@ -32,6 +32,7 @@ export default function CvPage() {
return { y: 100, opacity: 0, duration: 0.5 }
}
}
useTimeLine(col2Categories)
useGSAP(() => {
const items = gsap?.utils.toArray<GSAPTweenTarget>('.gsapan');
let dir = Direction.Left;
@@ -47,7 +48,7 @@ export default function CvPage() {
return (
<>
<SidebarProvider ref={container}>
{(sidebarCategories.data?.length ? sidebarCategories.data?.length : 0) > 0 ?
{sidebarCategories.data &&
<>
<SidebarTriggerDisappearsOnMobile />
<Sidebar className="gsapan ">
@@ -61,8 +62,7 @@ export default function CvPage() {
})}
</SidebarContent>
</Sidebar>
</> :
<></>
</>
}
<div className="h-full w-full flex flex-wrap flex-row p-4 pt-8 ">
<div id="mainwrap" className="flex w-full flex-col gap-4 lg:px-[15vw]">