From 27503576b41f7d53577a786b28c50b4ebae3e950 Mon Sep 17 00:00:00 2001 From: Keith Date: Tue, 16 Jul 2024 14:25:00 +0900 Subject: [PATCH] feat: update xudt tags 1. hide negative tags in the filter 2. hide duplicate tag 3. hide suspicious tag temporarily --- src/components/XUDTTag/index.tsx | 5 +++++ src/pages/Xudts/index.tsx | 24 ------------------------ 2 files changed, 5 insertions(+), 24 deletions(-) diff --git a/src/components/XUDTTag/index.tsx b/src/components/XUDTTag/index.tsx index 1acbb7fca..6aaf3d7d1 100644 --- a/src/components/XUDTTag/index.tsx +++ b/src/components/XUDTTag/index.tsx @@ -3,10 +3,15 @@ import { useTranslation } from 'react-i18next' import { useHistory } from 'react-router-dom' import styles from './styles.module.scss' +const HIDDEN_TAGS = ['duplicate', 'suspicious'] + const XUDTTag = ({ tagName }: { tagName: string }) => { const { t } = useTranslation() const { push } = useHistory() + // FIXME: the tag should be updated in the backend + if (HIDDEN_TAGS.includes(tagName)) return null + let tag = tagName let content = t(`xudt.tags.${tag}`) if (tag.startsWith('verified-on-')) { diff --git a/src/pages/Xudts/index.tsx b/src/pages/Xudts/index.tsx index d11248a2b..94a985faa 100644 --- a/src/pages/Xudts/index.tsx +++ b/src/pages/Xudts/index.tsx @@ -28,30 +28,12 @@ import XUDTTokenIcon from '../../assets/sudt_token.png' type SortField = 'transactions' | 'addresses_count' | 'created_time' | 'mint_status' const filterList = [ - { - key: 'invalid', - value: 'invalid', - title: , - to: '/xudts', - }, - { - key: 'suspicious', - value: 'suspicious', - title: , - to: '/xudts', - }, { key: 'out-of-length-range', value: 'out-of-length-range', title: , to: '/xudts', }, - { - key: 'duplicate', - value: 'duplicate', - title: , - to: '/xudts', - }, { key: 'layer-1-asset', value: 'layer-1-asset', @@ -64,12 +46,6 @@ const filterList = [ title: , to: '/xudts', }, - { - key: 'unnamed', - value: 'unnamed', - title: , - to: '/xudts', - }, { key: 'supply-limited', value: 'supply-limited',