diff --git a/frontend/.eslintrc.json b/frontend/.eslintrc.json index bffb357a71..dfc128b2ae 100644 --- a/frontend/.eslintrc.json +++ b/frontend/.eslintrc.json @@ -1,3 +1,6 @@ { - "extends": "next/core-web-vitals" -} + "extends": "next/core-web-vitals", + "rules": { + "react-hooks/exhaustive-deps": "off" + } +} \ No newline at end of file diff --git a/frontend/components/RouteGuard.js b/frontend/components/RouteGuard.js index 9c9343a8fd..51890c7a46 100644 --- a/frontend/components/RouteGuard.js +++ b/frontend/components/RouteGuard.js @@ -11,9 +11,11 @@ export default function RouteGuard({ children }) { const router = useRouter(); const [authorized, setAuthorized] = useState(false); - useEffect(async () => { + useEffect(() => { // on initial load - run auth check - await authCheck(router.asPath); + (async () => { + await authCheck(router.asPath); + })(); // on route change start - hide page content by setting authorized to false // #TODO: add the loading page when not yet authorized. @@ -31,7 +33,6 @@ export default function RouteGuard({ children }) { router.events.off("routeChangeComplete", authCheck); // router.events.off("routeChangeError", onError); }; - // eslint-disable-next-line react-hooks/exhaustive-deps }, []); diff --git a/frontend/components/basic/layout.js b/frontend/components/basic/layout.js index 4b01fd70da..20a5c824ca 100644 --- a/frontend/components/basic/layout.js +++ b/frontend/components/basic/layout.js @@ -1,3 +1,4 @@ +/* eslint-disable react-hooks/exhaustive-deps */ import Link from "next/link"; import { useRouter } from "next/router"; import { useEffect, useState } from "react"; diff --git a/frontend/components/basic/popups/BottomRightPopup.js b/frontend/components/basic/popups/BottomRightPopup.js index 61190a2f6e..4db24fb825 100644 --- a/frontend/components/basic/popups/BottomRightPopup.js +++ b/frontend/components/basic/popups/BottomRightPopup.js @@ -1,8 +1,6 @@ import React from "react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { - faXmark, -} from "@fortawesome/free-solid-svg-icons"; +import { faXmark } from "@fortawesome/free-solid-svg-icons"; export default function BottonRightPopup({ buttonText, @@ -11,22 +9,34 @@ export default function BottonRightPopup({ emoji, textLine1, textLine2, - setCheckDocsPopUpVisible + setCheckDocsPopUpVisible, }) { return ( -
- {"****".split("").map(() => (
+ {"****".split("").map((_, index) => (
- {"****".split("").map(() => (
+ {"****".split("").map((_, index) => (
- {"****".split("").map(() => (
+ {"****".split("").map((_, index) => (
- Let's get started + {"Let'"}s get started
- We've sent a verification email to{" "} + {"We've"} sent a verification email to{" "}
{email}{" "}
@@ -326,7 +326,7 @@ export default function SignUp() {
{codeError && (