From e0c2068dd8e26c0a93aa01a3fe3fbcdfe512cfc1 Mon Sep 17 00:00:00 2001 From: gratestas Date: Sat, 24 Jun 2023 00:09:26 +0300 Subject: [PATCH 1/4] fix: path to route must be relative based on Router setup --- src/routes/home/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/home/index.jsx b/src/routes/home/index.jsx index 46081f3..23c70a5 100644 --- a/src/routes/home/index.jsx +++ b/src/routes/home/index.jsx @@ -21,7 +21,7 @@ export default function Home() { return ( <> From ee5447db6c4f0e51ee225fb6a9605fcb6e024034 Mon Sep 17 00:00:00 2001 From: gratestas Date: Sat, 24 Jun 2023 00:25:44 +0300 Subject: [PATCH 2/4] fix: add optional chaining --- src/components/others/buttonSelectNetwork/index.jsx | 2 +- .../others/route_article/arbitrationDetails/index.jsx | 2 +- src/index.jsx | 1 + src/routes/home/index.jsx | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/others/buttonSelectNetwork/index.jsx b/src/components/others/buttonSelectNetwork/index.jsx index f351c75..71170d5 100644 --- a/src/components/others/buttonSelectNetwork/index.jsx +++ b/src/components/others/buttonSelectNetwork/index.jsx @@ -13,7 +13,7 @@ export default function ButtonSelectNetwork() { return (
-
); } diff --git a/src/components/others/route_article/arbitrationDetails/index.jsx b/src/components/others/route_article/arbitrationDetails/index.jsx index 298760a..b889676 100644 --- a/src/components/others/route_article/arbitrationDetails/index.jsx +++ b/src/components/others/route_article/arbitrationDetails/index.jsx @@ -159,7 +159,7 @@ export default function ArbitrationDetails({ article }) {
Arbitration Details
- {networkMap[ethereumContext.chainId].shortname !== "Mainnet" && ( + {networkMap[ethereumContext.chainId]?.shortname !== "Mainnet" && ( handleAdvanceState()}> {mined ? `Advance state` : `Mining...`} diff --git a/src/index.jsx b/src/index.jsx index dfded3b..5e1f1d0 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -56,6 +56,7 @@ function App() { const { pathname } = window.location; const pathSegment = pathname.split("/")[1]; const chainId = pathSegment.startsWith("0x") ? pathSegment : undefined; + console.log({ chainId }); return ( diff --git a/src/routes/home/index.jsx b/src/routes/home/index.jsx index 23c70a5..1aa6b43 100644 --- a/src/routes/home/index.jsx +++ b/src/routes/home/index.jsx @@ -109,7 +109,7 @@ export default function Home() { left for reader is to enjoy distilled information.

- + Explore The Truth Post
From 4ea52bb52c2309c79bd6a5fe63aff7f87591ebe3 Mon Sep 17 00:00:00 2001 From: gratestas Date: Sat, 24 Jun 2023 00:34:19 +0300 Subject: [PATCH 3/4] fix: check if absolute path works --- src/routes/home/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/home/index.jsx b/src/routes/home/index.jsx index 1aa6b43..e516ab4 100644 --- a/src/routes/home/index.jsx +++ b/src/routes/home/index.jsx @@ -21,7 +21,7 @@ export default function Home() { return ( <> From 4a9b6f0a4b27692d48d3c37aba21619a4b5aa350 Mon Sep 17 00:00:00 2001 From: gratestas Date: Sat, 24 Jun 2023 00:51:12 +0300 Subject: [PATCH 4/4] chore: temp comment out RouteRedirect component --- src/index.jsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/index.jsx b/src/index.jsx index 5e1f1d0..ac01981 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -26,18 +26,18 @@ const router = createBrowserRouter( } /> }> - }> - } /> + {/* }> */} + } /> - } loader={BrowseLoader} /> - } loader={ArticleLoader} /> - } loader={CourtLoader} /> + } loader={BrowseLoader} /> + } loader={ArticleLoader} /> + } loader={CourtLoader} /> - }> - } loader={AccountLoader} /> - } /> - + }> + } loader={AccountLoader} /> + } /> + {/* */} } />