Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Commit

Permalink
Fix: rename Collectibles to NFTs (#3768)
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh authored Apr 7, 2022
1 parent 8e4d2a0 commit c8bf105
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/components/AppLayout/Sidebar/useSidebarItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const useSidebarItems = (): ListItemType[] => {
}),
makeEntryItem({
disabled: !isCollectiblesEnabled,
label: 'Collectibles',
label: 'NFTs',
iconType: 'collectibles',
href: currentSafeRoutes.ASSETS_BALANCES_COLLECTIBLES,
}),
Expand Down
5 changes: 3 additions & 2 deletions src/routes/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ export const LOAD_SAFE_ROUTE = generatePath(LOAD_SPECIFIC_SAFE_ROUTE) // By prov

// [SAFE_SECTION_SLUG], [SAFE_SUBSECTION_SLUG] populated safe routes
export const SAFE_ROUTES = {
ASSETS_BALANCES: `${ADDRESSED_ROUTE}/balances`, // [SAFE_SECTION_SLUG] === 'balances'
ASSETS_BALANCES_COLLECTIBLES: `${ADDRESSED_ROUTE}/balances/collectibles`, // [SAFE_SUBSECTION_SLUG] === 'collectibles'
ASSETS_BALANCES: `${ADDRESSED_ROUTE}/balances`,
ASSETS_BALANCES_COLLECTIBLES: `${ADDRESSED_ROUTE}/balances/nfts`,
LEGACY_COLLECTIBLES: `${ADDRESSED_ROUTE}/balances/collectibles`,
TRANSACTIONS: `${ADDRESSED_ROUTE}/transactions`,
TRANSACTIONS_HISTORY: `${ADDRESSED_ROUTE}/transactions/history`,
TRANSACTIONS_QUEUE: `${ADDRESSED_ROUTE}/transactions/queue`,
Expand Down
4 changes: 1 addition & 3 deletions src/routes/safe/components/Balances/Collectibles/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,7 @@ const Collectibles = (): React.ReactElement => {
return (
<Card className={classes.cardOuter}>
<div className={classes.cardInner}>
<Paragraph className={classes.noData}>
{nftLoaded ? 'No collectibles available' : 'Loading collectibles...'}
</Paragraph>
<Paragraph className={classes.noData}>{nftLoaded ? 'No NFTs available' : 'Loading NFTs...'}</Paragraph>
</div>
</Card>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,8 @@ const ChooseTxType = ({
variant="contained"
testId="modal-send-collectible-btn"
>
<Img
alt="Send collectible"
className={classNames(classes.leftIcon, classes.iconSmall)}
src={Collectible}
/>
Send collectible
<Img alt="Send NFT" className={classNames(classes.leftIcon, classes.iconSmall)} src={Collectible} />
Send NFT
</Button>
</Track>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const ReviewCollectible = ({ onClose, onPrev, tx }: Props): React.ReactElement =

return (
<TxModalWrapper txData={txData} txTo={tx.assetAddress} onSubmit={submitTx} onBack={onPrev}>
<ModalHeader onClose={onClose} subTitle={getStepTitle(2, 2)} title="Send collectible" />
<ModalHeader onClose={onClose} subTitle={getStepTitle(2, 2)} title="Send NFT" />
<Hairline />
<Block className={classes.container}>
<SafeInfo text="Sending from" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const SendCollectible = ({

return (
<>
<ModalHeader onClose={onClose} subTitle={getStepTitle(1, 2)} title="Send collectible" />
<ModalHeader onClose={onClose} subTitle={getStepTitle(1, 2)} title="Send NFT" />
<Hairline />
<GnoForm formMutators={formMutators} initialValues={initialValues} onSubmit={handleSubmit}>
{(...args) => {
Expand Down
2 changes: 1 addition & 1 deletion src/routes/safe/components/Balances/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const BALANCE_ROW_TEST_ID = 'balance-row'

enum SECTION_NAME {
coins = 'Coins',
collectibles = 'Collectibles',
collectibles = 'NFTs',
}

const Balances = (): ReactElement => {
Expand Down
9 changes: 9 additions & 0 deletions src/routes/safe/container/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,15 @@ const Container = (): React.ReactElement => {
return (
<>
<Switch>
{/* Legacy redirect */}
<Route
path={SAFE_ROUTES.LEGACY_COLLECTIBLES}
exact
render={() => (
<Redirect to={generateSafeRoute(SAFE_ROUTES.ASSETS_BALANCES_COLLECTIBLES, extractPrefixedSafeAddress())} />
)}
/>

<Route
exact
path={[SAFE_ROUTES.ASSETS_BALANCES, SAFE_ROUTES.ASSETS_BALANCES_COLLECTIBLES]}
Expand Down

0 comments on commit c8bf105

Please sign in to comment.