Skip to content

Commit

Permalink
Adjust sidebar and link to new paths
Browse files Browse the repository at this point in the history
  • Loading branch information
ikprk committed Jun 3, 2024
1 parent ac81603 commit e8fb4f1
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ import {
SvgActionMoney,
SvgActionNewTab,
SvgSidebarHome,
SvgSidebarMarketplace,
SvgSidebarNft,
SvgSidebarReferrals,
SvgSidebarToken,
} from '@/assets/icons'
import { AppLogo } from '@/components/AppLogo'
import { Button } from '@/components/_buttons/Button'
Expand All @@ -35,10 +36,17 @@ export const viewerNavItems = [
bottomNav: true,
},
{
icon: <SvgSidebarMarketplace />,
expandedName: 'Marketplace',
name: 'Market',
to: absoluteRoutes.viewer.marketplace(),
icon: <SvgSidebarToken />,
expandedName: 'Tokens',
name: 'Tokens',
to: absoluteRoutes.viewer.crtMarketplace(),
bottomNav: true,
},
{
icon: <SvgSidebarNft />,
expandedName: 'NFTs',
name: 'NFTs',
to: absoluteRoutes.viewer.nftMarketplace(),
bottomNav: true,
},
...(atlasConfig.features.ypp.googleConsoleClientId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ const getLink = (type: LinkType, params: string[] = []): string => {
return absoluteRoutes.viewer.category(params[0])

case 'marketplace-page':
return absoluteRoutes.viewer.marketplace()
return absoluteRoutes.viewer.nftMarketplace()

case 'payments-page':
return absoluteRoutes.studio.payments()
Expand Down
3 changes: 2 additions & 1 deletion packages/atlas/src/config/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ export const relativeRoutes = {
memberById: (id = ':id', query?: { [QUERY_PARAMS.TAB]?: MemberTabs }) =>
withQueryParameters(`member/id/${id}`, query),
memberNotifications: () => 'notifications/member',
marketplace: () => 'marketplace',
nftMarketplace: () => 'nft-marketplace',
crtMarketplace: () => 'crt-marketplace',
ypp: (query?: { [QUERY_PARAMS.REFERRER_ID]?: string }) => withQueryParameters('ypp', query),
yppTest: () => 'ypp/rewards',
yppDashboard: () => 'ypp-dashboard',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const PortfolioNftTab = () => {
title="You don’t own any NFTs yet"
subtitle="When you buy any NFTs you will be able to manage them and view from this page."
button={
<Button size="large" variant="secondary" to={absoluteRoutes.viewer.marketplace()}>
<Button size="large" variant="secondary" to={absoluteRoutes.viewer.nftMarketplace()}>
Explore NFTs
</Button>
}
Expand Down
10 changes: 8 additions & 2 deletions packages/atlas/src/views/viewer/ViewerLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ const CategoryView = lazy(() => import('./CategoryView').then((module) => ({ def
const ChannelView = lazy(() => import('./ChannelView').then((module) => ({ default: module.ChannelView })))
const ChannelsView = lazy(() => import('./ChannelsView').then((module) => ({ default: module.ChannelsView })))
const HomeView = lazy(() => import('./HomeView').then((module) => ({ default: module.HomeView })))
const MarketplaceView = lazy(() => import('./MarketplaceView').then((module) => ({ default: module.MarketplaceView })))
const NftMarketplaceView = lazy(() =>
import('./NftMarketplaceView').then((module) => ({ default: module.NftMarketplaceView }))
)
const CrtMarketplaceView = lazy(() =>
import('./CrtMarketplaceView').then((module) => ({ default: module.CrtMarketplaceView }))
)
const MemberView = lazy(() => import('./MemberView').then((module) => ({ default: module.MemberView })))
const MembershipSettingsView = lazy(() =>
import('./MembershipSettingsView').then((module) => ({ default: module.MembershipSettingsView }))
Expand All @@ -62,7 +67,8 @@ const viewerRoutes = [
{ path: relativeRoutes.viewer.category(), element: <CategoryView /> },
{ path: relativeRoutes.viewer.memberById(), element: <MemberView /> },
{ path: relativeRoutes.viewer.member(), element: <MemberView /> },
{ path: relativeRoutes.viewer.marketplace(), element: <MarketplaceView /> },
{ path: relativeRoutes.viewer.crtMarketplace(), element: <CrtMarketplaceView /> },
{ path: relativeRoutes.viewer.nftMarketplace(), element: <NftMarketplaceView /> },
...(atlasConfig.features.ypp.googleConsoleClientId
? [
{ path: relativeRoutes.viewer.ypp(), element: <YppLandingView /> },
Expand Down

0 comments on commit e8fb4f1

Please sign in to comment.