Files
js/@3rdweb-sdk/react/hooks/useCommon.ts
T
caa6e5635d Add marketplace v3 tabs (#827)
* Add direct listings tab logic

* Add common table for both direct listings and english auctions

* Add UI to cancel listing/auction

* Disable create listing button if no address

* Detect features

* Update storage

* Can deploy marketplace v3 and create direct listings

* Can create english auctions

* Update auth

* Fix build

* Add marketplace v3 deployment event

* We got status pog

* Rendering english auctions

* Add getValid results filter

* Update create listing text

* Only show select if extension enable, default to one from tab

* Fix logic

* Fix cache

* Fix build

* Show default snippets if possible

* Update sdks

* Update storage

* Add support for 3d files (#837)

* Fix overflow in markdown renderer caused by inline code (#836)

* Add support for 3d files

* fix up nft media?

* seems to work now

---------

Co-authored-by: Manan Tank <[email protected]>
Co-authored-by: Jonas Daniels <[email protected]>

* Add price column

* Fix math

* Only allow to create each listing on each tab

* No need to detect here anymore

* Use NFTMedia commponent, make tooltip nicer

* Add CTA if no NFTs found

* Remove plural

* Remove invalid prop

* Move comments

* Improve platform fees text for marketplace

* Add new staking section and marketplace v3 to beta section

* Give auctionTimes defaults

* Update SDKs to nightly

* Use previous nightly D:

* Fix build

---------

Co-authored-by: sid <[email protected]>
Co-authored-by: Jonas Daniels <[email protected]>
Co-authored-by: Manan Tank <[email protected]>
2023-02-04 03:32:04 +00:00

34 lines
1.0 KiB
TypeScript

export function usePascalCaseContractName(contractName: string) {
if (!contractName) {
return null;
} else if (contractName === "nft-drop") {
return "NFTDrop";
} else if (contractName === "edition-drop") {
return "EditionDrop";
} else if (contractName === "nft-collection") {
return "NFTCollection";
} else if (contractName === "edition") {
return "Edition";
} else if (contractName === "token") {
return "Token";
} else if (contractName === "marketplace") {
return "Marketplace";
} else if (contractName === "vote") {
return "Vote";
} else if (contractName === "split") {
return "Split";
} else if (contractName === "token-drop") {
return "TokenDrop";
} else if (contractName === "signature-drop") {
return "SignatureDrop";
} else if (contractName === "pack") {
return "Pack";
} else if (contractName === "multiwrap") {
return "Multiwrap";
} else if (contractName === "marketplace-v3") {
return "MarketplaceV3";
} else {
return contractName;
}
}