🔥 Remove redundant tilt deps

This commit is contained in:
Malted 2023-04-06 23:01:27 +01:00
parent d0dc739236
commit 0dc8635b54
No known key found for this signature in database
GPG key ID: C1AF1C0E5180BE02
2 changed files with 0 additions and 22 deletions

View file

@ -3,7 +3,6 @@ import Icon from '../../icon'
import Masonry from 'react-masonry-css'
import NextImage from 'next/image'
import Tilt from '../../tilt'
import Fade from 'react-reveal/Fade'
export default function Features() {

View file

@ -1,21 +0,0 @@
import React, { useEffect, useRef } from 'react'
import VanillaTilt from 'vanilla-tilt'
// NOTE(@lachlanjc): only pass one child!
const Tilt = ({ options = {}, children, ...props }) => {
const root = useRef(null)
useEffect(() => {
VanillaTilt.init(root.current, {
max: 3,
scale: 1.05,
speed: 600,
glare: true,
'max-glare': 0.25,
gyroscope: false,
...options
})
}, [])
return React.cloneElement(children, { ref: root })
}
export default Tilt