Add lowercase option for NEXT_PUBLIC_VIEWS_NFT_MARKETPLACES (#3097)

Resolves #3093
This commit is contained in:
tom goriunov
2025-11-04 15:42:11 +01:00
committed by GitHub
parent 90fd801b45
commit c47d54cf1c
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -342,7 +342,7 @@ Settings for meta tags, OG tags and SEO
| instance_url | `string` | URL template for NFT instance | - | - | `https://opensea.io/assets/ethereum/{hash}/{id}` |
| logo_url | `string` | URL of marketplace logo | Required | - | `https://opensea.io/static/images/logos/opensea-logo.svg` |
*Note* URL templates should contain placeholders of NFT hash (`{hash}`) and NFT id (`{id}`). This placeholders will be substituted with particular values for every collection or instance.
*Note* URL templates should contain placeholders for the NFT hash (`{hash}` or `{hash_lowercase}`) and NFT ID (`{id}` or `{id_lowercase}`). These placeholders will be replaced with specific values or their lowercase equivalents for each collection or instance.
 
+5 -1
View File
@@ -31,7 +31,11 @@ const TokenNftMarketplaces = ({ hash, id, isLoading, appActionData, source }: Pr
if (!hrefTemplate) {
return null;
}
const href = hrefTemplate.replace('{id}', id || '').replace('{hash}', hash || '');
const href = hrefTemplate
.replace('{id}', id || '')
.replace('{id_lowercase}', id?.toLowerCase() || '')
.replace('{hash}', hash || '')
.replace('{hash_lowercase}', hash?.toLowerCase() || '');
return {
href,