Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixed links and modal behavior #961

Merged
merged 2 commits into from
Jun 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions web/src/hooks/useFocusOutside.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ import React, { useEffect } from "react";
export function useFocusOutside(ref: React.RefObject<HTMLDivElement>, 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]);
Expand Down
12 changes: 6 additions & 6 deletions web/src/layout/Header/navbar/DappList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
];

Expand Down
10 changes: 5 additions & 5 deletions web/src/layout/Header/navbar/Menu/Help.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const ITEMS = [
{
text: "Onboarding",
Icon: Book,
url: "https://kleros.dodao.io/",
url: "",
},
{
text: "Get Help",
Expand All @@ -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",
},
];

Expand Down