scroll trigger fix
This commit is contained in:
parent
e4be9849d6
commit
b34e78ada8
|
@ -12,10 +12,13 @@ import IconWithText from '../shared/IconWithText'
|
|||
import SectionWrapper from '../shared/SectionWrapper'
|
||||
import { gsap } from 'gsap'
|
||||
import { ScrollTrigger } from 'gsap/ScrollTrigger'
|
||||
import { useEffect, useLayoutEffect, useRef } from 'react'
|
||||
import { useLayoutEffect, useRef } from 'react'
|
||||
import { MotionPathPlugin } from 'gsap/dist/MotionPathPlugin'
|
||||
import ColorBlur from '../shared/ColorBlur'
|
||||
|
||||
gsap.registerPlugin(MotionPathPlugin)
|
||||
gsap.registerPlugin(ScrollTrigger)
|
||||
|
||||
const tokenIcons = [
|
||||
{ icon: 'coin-orange.png', x: '10%', y: '20%' },
|
||||
{ icon: 'coin-silver.png', x: '2%', y: '10%' },
|
||||
|
@ -41,11 +44,6 @@ const HomePage = () => {
|
|||
const swapPanel = useRef()
|
||||
const coreFeatures = useRef()
|
||||
|
||||
useEffect(() => {
|
||||
gsap.registerPlugin(MotionPathPlugin)
|
||||
gsap.registerPlugin(ScrollTrigger)
|
||||
}, [])
|
||||
|
||||
useLayoutEffect(() => {
|
||||
const ctx = gsap.context((self) => {
|
||||
const boxes = self.selector('.highlight-features')
|
||||
|
|
Loading…
Reference in New Issue