From 24a94a6e465860e666ec1d0d53f9642cd112fe98 Mon Sep 17 00:00:00 2001 From: saroj sharma Date: Wed, 19 Apr 2023 13:08:46 +0545 Subject: [PATCH] fix(Target): replace target type with isExternal --- src/components/DetailedListView.astro | 3 +-- src/data/tools.ts | 2 +- src/views/Web3Tools.astro | 2 +- types/custom.d.ts | 4 ++-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/components/DetailedListView.astro b/src/components/DetailedListView.astro index d458e4e3..fefebde8 100644 --- a/src/components/DetailedListView.astro +++ b/src/components/DetailedListView.astro @@ -9,7 +9,6 @@ interface Props { subtitle: string; items: DetailedListViewItem[]; showArrow?: boolean; - target?: string; } const { props } = Astro; @@ -29,7 +28,7 @@ const { props } = Astro; { props.items.map((item) => { return ( - +

{item.title}

diff --git a/src/data/tools.ts b/src/data/tools.ts index 87384934..14ac9b20 100644 --- a/src/data/tools.ts +++ b/src/data/tools.ts @@ -50,7 +50,7 @@ const tools: Web3ToolItem[] = [ category: 'IPFS Gateway', icon: 'code-square-01', badges: [], - target: '_blank' + isExternal: true } ] diff --git a/src/views/Web3Tools.astro b/src/views/Web3Tools.astro index 7b04c1b1..0eababbc 100644 --- a/src/views/Web3Tools.astro +++ b/src/views/Web3Tools.astro @@ -21,7 +21,7 @@ const items = tools.map((tool) => { category: tool.category, icon: tool.icon, href: tool.path || `/web3-tools/${tool.slug}/`, - target: tool.target, + isExternal: tool.isExternal, }; }); --- diff --git a/types/custom.d.ts b/types/custom.d.ts index c50fe23a..11c65af1 100644 --- a/types/custom.d.ts +++ b/types/custom.d.ts @@ -94,7 +94,7 @@ interface DetailedListViewItem { href: string icon: string category: string - target?: string + isExternal?: boolean } interface NamedIcon { @@ -229,7 +229,7 @@ interface Web3ToolItem { icon: string text: string }> - target?: '_blank' | '_self' | '_parent' | '_top' + isExternal?: boolean } interface TableRenderConfig {