Skip to content

Commit

Permalink
V2 Release, written in NextJS
Browse files Browse the repository at this point in the history
  • Loading branch information
boomermath authored Feb 21, 2022
1 parent e01b86c commit 2df6a57
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/Background.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useEffect, useRef, useState } from "react";
import { useLayoutEffect, useRef, useState } from "react";
import * as THREE from "three";
import FOG from "vanta/dist/vanta.fog.min";
import { useDarkMode, useWindowSize } from "./Hooks";
Expand All @@ -19,7 +19,7 @@ export default function Background({ children }) {
const vantaRef = useRef();

/* eslint-disable react-hooks/exhaustive-deps */
useEffect(() => {
useLayoutEffect(() => {
const isDark = mode === "dark";

if (vantaEffect) {
Expand Down Expand Up @@ -53,4 +53,4 @@ export default function Background({ children }) {
<div>{children}</div>
</div>
)
}
}

0 comments on commit 2df6a57

Please sign in to comment.