diff --git a/web/src/hooks/useFocusOutside.ts b/web/src/hooks/useFocusOutside.ts index 6bb8204ff..429f5b3e5 100644 --- a/web/src/hooks/useFocusOutside.ts +++ b/web/src/hooks/useFocusOutside.ts @@ -3,15 +3,13 @@ import React, { useEffect } from "react"; export function useFocusOutside(ref: React.RefObject, callback: () => void) { useEffect(() => { function handleEvent(event: FocusEvent | MouseEvent) { - if (ref.current && !ref.current.contains(event.target as Node)) { + if (document.visibilityState === "visible" && ref.current && !ref.current.contains(event.target as Node)) { callback(); } } - document.addEventListener("focusin", handleEvent); document.addEventListener("mousedown", handleEvent); return () => { - document.removeEventListener("focusin", handleEvent); document.removeEventListener("mousedown", handleEvent); }; }, [ref, callback]); diff --git a/web/src/layout/Header/navbar/DappList.tsx b/web/src/layout/Header/navbar/DappList.tsx index 96ec90511..afedc1ef9 100644 --- a/web/src/layout/Header/navbar/DappList.tsx +++ b/web/src/layout/Header/navbar/DappList.tsx @@ -30,32 +30,32 @@ const ITEMS = [ { text: "Tokens", Icon: Tokens, - url: "https://tokens.kleros.io/", + url: "https://tokens.kleros.io", }, { text: "POH", Icon: POH, - url: "https://www.proofofhumanity.id", + url: "https://app.proofofhumanity.id", }, { text: "Curate", Icon: Curate, - url: "https://curate.kleros.io/", + url: "https://curate.kleros.io", }, { text: "Resolver", Icon: Resolver, - url: "https://resolve.kleros.io/", + url: "https://resolve.kleros.io", }, { text: "Linguo", Icon: Linguo, - url: "https://linguo.kleros.io/", + url: "https://linguo.kleros.io", }, { text: "Governor", Icon: Governor, - url: "https://governor.kleros.io/", + url: "https://governor.kleros.io", }, ]; diff --git a/web/src/layout/Header/navbar/Menu/Help.tsx b/web/src/layout/Header/navbar/Menu/Help.tsx index c29236989..f8d01eab0 100644 --- a/web/src/layout/Header/navbar/Menu/Help.tsx +++ b/web/src/layout/Header/navbar/Menu/Help.tsx @@ -13,7 +13,7 @@ const ITEMS = [ { text: "Onboarding", Icon: Book, - url: "https://kleros.dodao.io/", + url: "", }, { text: "Get Help", @@ -23,22 +23,22 @@ const ITEMS = [ { text: "Report a Bug", Icon: Bug, - url: "https://github.com/kleros/kleros-v2/issues/new", + url: "https://github.com/kleros/kleros-v2/issues", }, { text: "DApp Guide", Icon: Guide, - url: "", + url: "https://docs.kleros.io/products/court-v2", }, { text: "Crypto Beginner's Guide", Icon: ETH, - url: "", + url: "https://ethereum.org/en/wallets/", }, { text: "FAQ", Icon: Faq, - url: "https://kleros.gitbook.io/docs/kleros-faq", + url: "https://docs.kleros.io/kleros-faq", }, ];