From 0dc8635b5429422c7722a51d8cbac48ca0112587 Mon Sep 17 00:00:00 2001 From: Malted Date: Thu, 6 Apr 2023 23:01:27 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Remove=20redundant=20tilt=20deps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/bank/first/features.js | 1 - components/index/cards/tilt.js | 21 --------------------- 2 files changed, 22 deletions(-) delete mode 100644 components/index/cards/tilt.js diff --git a/components/bank/first/features.js b/components/bank/first/features.js index d8ecfec1..d67d18b6 100644 --- a/components/bank/first/features.js +++ b/components/bank/first/features.js @@ -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() { diff --git a/components/index/cards/tilt.js b/components/index/cards/tilt.js deleted file mode 100644 index f832783e..00000000 --- a/components/index/cards/tilt.js +++ /dev/null @@ -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