Skip to content

Commit

Permalink
feat: change my assets default order and section (#2239)
Browse files Browse the repository at this point in the history
  • Loading branch information
Melisa Anabella Rossi authored May 2, 2024
1 parent 538e02f commit b6628f1
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ const CurrentAccountSidebar = ({ section, onBrowse }: Props) => {
<>
<Menu>
<Header sub>{t('account_sidebar.assets')}</Header>
<NFTSectionsMenuItems
sections={[WEARABLES, EMOTES, ENS, LAND]}
section={section as Section}
onSectionClick={section => onBrowse(decentraland, section)}
/>
<MenuItem
key={COLLECTIONS}
value={COLLECTIONS}
currentValue={section}
onClick={section => changeFilter('section', section, { clearOldFilters: true })}
/>
<NFTSectionsMenuItems
sections={[LAND, WEARABLES, EMOTES, ENS]}
section={section as Section}
onSectionClick={section => onBrowse(decentraland, section)}
/>
</Menu>
<Menu>
<Header sub>{t('account_sidebar.store')}</Header>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@

.fullWidth {
width: 100%;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const Loading = ({ fullWidth }: { fullWidth: boolean }) => (

// Exporting to reuse in the BuyPage as a quick fix
export const NotFound = () => (
<div className={styles.center}>
<div className={classNames(styles.center, styles.fullWidth)}>
<p className="secondary-text">{t('global.not_found')}&hellip;</p>
</div>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,6 @@ const NFTSectionsMenuItems = ({ section, sections, onSectionClick }: Props) => {
{sections.includes(Section.ALL) && (
<MenuItem key={Section.ALL} value={Section.ALL} currentValue={section} onClick={handleOnSectionClick} />
)}
{shouldRenderSection(Section.LAND, sections) && (
<>
<MenuItem key={Section.LAND} value={Section.LAND} currentValue={section} onClick={handleOnSectionClick} />
{isLandSection(section)
? [Section.PARCELS, Section.ESTATES].map(menuSection => (
<MenuItem key={menuSection} value={menuSection} currentValue={section} onClick={handleOnSectionClick} nestedLevel={1} />
))
: null}
</>
)}
{shouldRenderSection(Section.WEARABLES, sections) && (
<>
<MenuItem value={Section.WEARABLES} currentValue={section} onClick={handleOnSectionClick} />
Expand Down Expand Up @@ -134,6 +124,16 @@ const NFTSectionsMenuItems = ({ section, sections, onSectionClick }: Props) => {
</>
)}
{shouldRenderSection(Section.ENS, sections) && <MenuItem value={Section.ENS} currentValue={section} onClick={handleOnSectionClick} />}
{shouldRenderSection(Section.LAND, sections) && (
<>
<MenuItem key={Section.LAND} value={Section.LAND} currentValue={section} onClick={handleOnSectionClick} />
{isLandSection(section)
? [Section.PARCELS, Section.ESTATES].map(menuSection => (
<MenuItem key={menuSection} value={menuSection} currentValue={section} onClick={handleOnSectionClick} nestedLevel={1} />
))
: null}
</>
)}
</>
)
}
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/modules/routing/locations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const locations = {
},
defaultCurrentAccount: function () {
return this.currentAccount({
section: Section.COLLECTIONS
section: Section.WEARABLES
})
},
lists: () => '/lists',
Expand Down

0 comments on commit b6628f1

Please sign in to comment.