diff --git a/src/App.jsx b/src/App.jsx index 6a53e384..443b0643 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -114,9 +114,9 @@ const CardanoExplorer = () => { name: "AdaStat", description: "Ideal for analysts and researcher who need to advanced statistical analyses and network monitoring.", - url: "https://adastat.net/", + url: deepLinkResolver.getAdaStatLink("https://adastat.net/"), image: adaStatLogo, - isDeepLink: false, + isDeepLink: true, }, explorer: { name: "Explorer (Beta)", @@ -305,4 +305,4 @@ function App() { ); } -export default App; +export default App; \ No newline at end of file diff --git a/src/common/DeepLinkResolver.jsx b/src/common/DeepLinkResolver.jsx index 2cbec010..2f30767c 100644 --- a/src/common/DeepLinkResolver.jsx +++ b/src/common/DeepLinkResolver.jsx @@ -72,6 +72,25 @@ class DeepLinkResolver { return link; } + getAdaStatLink(baseLink) { + var link = baseLink; + switch (this.mode) { + case "epoch": + link += `epochs/${this.getValue()}`; + break; + case "block": + link += `blocks/${this.getValue()}`; + break; + case "transaction": + link += `transactions/${this.getValue()}`; + break; + case "address": + link += `addresses/${this.getValue()}`; + break; + } + return link; + } + getValue() { switch (this.mode) { case "epoch":