diff --git a/website/src/components/parts/KeyLoveFAQ.js b/website/src/components/parts/KeyLoveFAQ.js index 9574f70e5..1fcc9ac0f 100644 --- a/website/src/components/parts/KeyLoveFAQ.js +++ b/website/src/components/parts/KeyLoveFAQ.js @@ -1,19 +1,24 @@ -import React, { useEffect } from "react"; -import feather from "feather-icons"; -import { WOW } from "wowjs"; -import { jarallax } from "jarallax"; +import React, { useEffect, useRef } from "react"; import { Icon } from "@iconify/react"; -import "animate.css"; -import "tw-elements"; export default function KeyLoveFAQ() { + const jarallaxRef = useRef(null); useEffect(() => { - new WOW().init(); - feather.replace(); - jarallax(document.querySelectorAll(".jarallax"), { - speed: 0.2, - }); - }); + if (typeof window !== "undefined") { + const WOW = require("wowjs"); + const father = require("feather-icons"); + const jarallax = require("jarallax"); + require("tw-elements"); + + new WOW.WOW({ + live: false, + }).init(); + father.replace(); + jarallax.jarallax(jarallaxRef.current, { + speed: 0.2, + }); + } + }, []); return (
@@ -448,6 +453,7 @@ export default function KeyLoveFAQ() {
diff --git a/website/src/components/parts/MainComp.js b/website/src/components/parts/MainComp.js index d03c35f41..3098d2bfa 100644 --- a/website/src/components/parts/MainComp.js +++ b/website/src/components/parts/MainComp.js @@ -5,8 +5,8 @@ import Hero from "./Hero"; import Demo from "./Demo"; import FourthSection from "./FourthSection"; import Cookies from "./Cookies"; +import KeyLoveFAQ from "./KeyLoveFAQ"; -const KeyLoveFAQComp = loadable(() => import("./KeyLoveFAQ")); const BackToTopComp = loadable(() => import("./BackToTop")); export function MainComp() { @@ -14,7 +14,7 @@ export function MainComp() { <> - +