Skip to content

Commit 031a528

Browse files
authoredJun 23, 2023
Merge pull request #961 from kleros/fix(web)/fix-links-and-modal-behavior
fix: fixed links and modal behavior
2 parents 5acd04a + 1277bec commit 031a528

File tree

3 files changed

+12
-14
lines changed

3 files changed

+12
-14
lines changed
 

‎web/src/hooks/useFocusOutside.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@ import React, { useEffect } from "react";
33
export function useFocusOutside(ref: React.RefObject<HTMLDivElement>, callback: () => void) {
44
useEffect(() => {
55
function handleEvent(event: FocusEvent | MouseEvent) {
6-
if (ref.current && !ref.current.contains(event.target as Node)) {
6+
if (document.visibilityState === "visible" && ref.current && !ref.current.contains(event.target as Node)) {
77
callback();
88
}
99
}
1010

11-
document.addEventListener("focusin", handleEvent);
1211
document.addEventListener("mousedown", handleEvent);
1312
return () => {
14-
document.removeEventListener("focusin", handleEvent);
1513
document.removeEventListener("mousedown", handleEvent);
1614
};
1715
}, [ref, callback]);

‎web/src/layout/Header/navbar/DappList.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -30,32 +30,32 @@ const ITEMS = [
3030
{
3131
text: "Tokens",
3232
Icon: Tokens,
33-
url: "https://tokens.kleros.io/",
33+
url: "https://tokens.kleros.io",
3434
},
3535
{
3636
text: "POH",
3737
Icon: POH,
38-
url: "https://www.proofofhumanity.id",
38+
url: "https://app.proofofhumanity.id",
3939
},
4040
{
4141
text: "Curate",
4242
Icon: Curate,
43-
url: "https://curate.kleros.io/",
43+
url: "https://curate.kleros.io",
4444
},
4545
{
4646
text: "Resolver",
4747
Icon: Resolver,
48-
url: "https://resolve.kleros.io/",
48+
url: "https://resolve.kleros.io",
4949
},
5050
{
5151
text: "Linguo",
5252
Icon: Linguo,
53-
url: "https://linguo.kleros.io/",
53+
url: "https://linguo.kleros.io",
5454
},
5555
{
5656
text: "Governor",
5757
Icon: Governor,
58-
url: "https://governor.kleros.io/",
58+
url: "https://governor.kleros.io",
5959
},
6060
];
6161

‎web/src/layout/Header/navbar/Menu/Help.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const ITEMS = [
1313
{
1414
text: "Onboarding",
1515
Icon: Book,
16-
url: "https://kleros.dodao.io/",
16+
url: "",
1717
},
1818
{
1919
text: "Get Help",
@@ -23,22 +23,22 @@ const ITEMS = [
2323
{
2424
text: "Report a Bug",
2525
Icon: Bug,
26-
url: "https://github.com/kleros/kleros-v2/issues/new",
26+
url: "https://github.com/kleros/kleros-v2/issues",
2727
},
2828
{
2929
text: "DApp Guide",
3030
Icon: Guide,
31-
url: "",
31+
url: "https://docs.kleros.io/products/court-v2",
3232
},
3333
{
3434
text: "Crypto Beginner's Guide",
3535
Icon: ETH,
36-
url: "",
36+
url: "https://ethereum.org/en/wallets/",
3737
},
3838
{
3939
text: "FAQ",
4040
Icon: Faq,
41-
url: "https://kleros.gitbook.io/docs/kleros-faq",
41+
url: "https://docs.kleros.io/kleros-faq",
4242
},
4343
];
4444

0 commit comments

Comments
 (0)
Please sign in to comment.