From 2bcee4f849a1f4f835ccdd360d671462d919a38a Mon Sep 17 00:00:00 2001 From: 1aerostorm Date: Wed, 8 Nov 2023 20:37:52 +0000 Subject: [PATCH] Fix Gift NFT --- app/components/modules/GiftNFT.jsx | 19 +++++++++++++++++-- app/locales/en.json | 7 +++++++ app/locales/ru-RU.json | 7 +++++++ 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/app/components/modules/GiftNFT.jsx b/app/components/modules/GiftNFT.jsx index e0ceac29..29cf7e09 100644 --- a/app/components/modules/GiftNFT.jsx +++ b/app/components/modules/GiftNFT.jsx @@ -9,6 +9,7 @@ import LoadingIndicator from 'app/components/elements/LoadingIndicator' import g from 'app/redux/GlobalReducer' import transaction from 'app/redux/Transaction' import { getAssetMeta } from 'app/utils/market/utils' +import { walletUrl } from 'app/utils/walletUtils' class GiftNFT extends React.Component { constructor(props) { @@ -74,7 +75,7 @@ class GiftNFT extends React.Component { } - items.push( this.giftNFT(e, token_id)}> + items.push( this.giftNFT(e, token_id)}> e.preventDefault()} /> @@ -89,8 +90,22 @@ class GiftNFT extends React.Component { ++count } - if (!items.length) { + if (!nft_tokens) { items = + } else if (!items.length) { + items =
+ {tt('gift_nft.no_tokens')} + {currentUser && + + {tt('gift_nft.issue')} + + {tt('gift_nft.no_tokens2')} + + {tt('gift_nft.buy')} + + {tt('gift_nft.no_tokens3')} + } +
} else { items = {items} diff --git a/app/locales/en.json b/app/locales/en.json index b29eed6e..5f6af1c9 100644 --- a/app/locales/en.json +++ b/app/locales/en.json @@ -731,6 +731,13 @@ "ok": "Ok", "confirm": "Confirm" }, + "gift_nft": { + "no_tokens": "You haven't any NFT-tokens yet. ", + "issue": "Issue", + "no_tokens2": " or ", + "buy": "buy", + "no_tokens3": " them." + }, "header_jsx": { "home": "home", "created": "New", diff --git a/app/locales/ru-RU.json b/app/locales/ru-RU.json index daa9e454..0c11f887 100644 --- a/app/locales/ru-RU.json +++ b/app/locales/ru-RU.json @@ -452,6 +452,13 @@ "unwanted_operation_cost": "Плата за отправку нежелательных операций (если получатель заблокировал отправителя или выбрал Не беспокоить)", "unlimit_operation_cost": "Плата за отправку операций при отрицательной репутации, за обход лимитов post/comment/vote-window" }, + "gift_nft": { + "no_tokens": "У вас пока еще нет NFT-токенов. ", + "issue": "Создайте", + "no_tokens2": " или ", + "buy": "купите", + "no_tokens3": " их." + }, "header_jsx": { "home": "Лента", "created": "Новые",