File tree Expand file tree Collapse file tree 2 files changed +37
-4
lines changed Expand file tree Collapse file tree 2 files changed +37
-4
lines changed Original file line number Diff line number Diff line change 11"use client" ;
2+ /* eslint-disable react-hooks/exhaustive-deps */
23import React , { useEffect , useState , useRef } from "react" ;
34import {
45 motion ,
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ const transitionVariants = {
2020 filter : "blur(0px)" ,
2121 y : 0 ,
2222 transition : {
23- type : "spring" ,
23+ type : "spring" as const ,
2424 bounce : 0.3 ,
2525 duration : 1.5 ,
2626 } ,
@@ -52,7 +52,7 @@ export default function HeroSection() {
5252 opacity : 1 ,
5353 y : 0 ,
5454 transition : {
55- type : "spring" ,
55+ type : "spring" as const ,
5656 bounce : 0.3 ,
5757 duration : 2 ,
5858 } ,
@@ -135,7 +135,23 @@ export default function HeroSection() {
135135 } ,
136136 } ,
137137 } ,
138- ...transitionVariants ,
138+ item : {
139+ hidden : {
140+ opacity : 0 ,
141+ filter : "blur(12px)" ,
142+ y : 12 ,
143+ } ,
144+ visible : {
145+ opacity : 1 ,
146+ filter : "blur(0px)" ,
147+ y : 0 ,
148+ transition : {
149+ type : "spring" as const ,
150+ bounce : 0.3 ,
151+ duration : 1.5 ,
152+ } ,
153+ } ,
154+ } ,
139155 } }
140156 className = "mt-12 flex flex-col items-center justify-center gap-2 md:flex-row"
141157 >
@@ -193,7 +209,23 @@ export default function HeroSection() {
193209 } ,
194210 } ,
195211 } ,
196- ...transitionVariants ,
212+ item : {
213+ hidden : {
214+ opacity : 0 ,
215+ filter : "blur(12px)" ,
216+ y : 12 ,
217+ } ,
218+ visible : {
219+ opacity : 1 ,
220+ filter : "blur(0px)" ,
221+ y : 0 ,
222+ transition : {
223+ type : "spring" as const ,
224+ bounce : 0.3 ,
225+ duration : 1.5 ,
226+ } ,
227+ } ,
228+ } ,
197229 } }
198230 >
199231 < div className = "relative -mr-56 mt-8 overflow-hidden px-2 sm:mr-0 sm:mt-12 md:mt-20" >
You can’t perform that action at this time.
0 commit comments