Commit 9e05c178 authored by vignesh mohankumar's avatar vignesh mohankumar Committed by GitHub

fix: move /profile to /nfts/profile (#5084)

* fix: move /profile to /nfts/profile

* add back variable

* fix

* rm shouldShowBag
parent d98808da
......@@ -23,7 +23,7 @@ export const ShoppingBag = () => {
setSellQuantity(sellAssets.length)
}, [sellAssets])
const isProfilePage = location.pathname === '/profile'
const isProfilePage = location.pathname === '/nfts/profile'
return (
<NavIcon onClick={toggleBag}>
......
......@@ -70,7 +70,7 @@ const PageTabs = () => {
const Navbar = () => {
const { pathname } = useLocation()
const isNftPage = pathname.startsWith('/nfts') || pathname.startsWith('/profile')
const isNftPage = pathname.startsWith('/nfts')
return (
<>
......
......@@ -133,7 +133,7 @@ const AuthenticatedHeader = () => {
}, [balanceString, nativeCurrencyPrice])
const navigateToProfile = () => {
navigate('/profile')
navigate('/nfts/profile')
closeModal()
}
......
......@@ -87,9 +87,8 @@ const Bag = () => {
const setBagExpanded = useBag((state) => state.setBagExpanded)
const { pathname } = useLocation()
const isProfilePage = pathname.startsWith('/profile')
const isProfilePage = pathname.startsWith('/nfts/profile')
const isNFTPage = pathname.startsWith('/nfts')
const shouldShowBag = isNFTPage || isProfilePage
const isMobile = useIsMobile()
const isDetailsPage = pathname.includes('/nfts/asset/')
......@@ -266,7 +265,7 @@ const Bag = () => {
return (
<>
{bagExpanded && shouldShowBag ? (
{bagExpanded && isNFTPage ? (
<Portal>
<Column zIndex={isMobile || isOpen ? 'modal' : '3'} className={styles.bagContainer}>
{!(isProfilePage && profilePageState === ProfilePageStateType.LISTING) ? (
......
......@@ -15,7 +15,7 @@ const StyledColumn = styled(Column)<{ isProfilePage?: boolean }>`
const EmptyState = () => {
const { pathname } = useLocation()
const isProfilePage = pathname.startsWith('/profile')
const isProfilePage = pathname.startsWith('/nfts/profile')
return (
<StyledColumn isProfilePage={isProfilePage}>
......
......@@ -242,7 +242,6 @@ export default function App() {
{nftFlag === NftVariant.Enabled && (
<>
<Route path="/profile" element={<Profile />} />
<Route path="/nfts" element={<NftExplore />} />
<Route
path="/nfts/asset/:contractAddress/:tokenId"
......@@ -252,6 +251,7 @@ export default function App() {
</Suspense>
}
/>
<Route path="/nfts/profile" element={<Profile />} />
<Route path="/nfts/collection/:contractAddress" element={<Collection />} />
<Route path="/nfts/collection/:contractAddress/activity" element={<Collection />} />
</>
......
......@@ -30,7 +30,7 @@ export default function RadialGradientByChainUpdater(): null {
const { chainId } = useWeb3React()
const [darkMode] = useDarkModeManager()
const { pathname } = useLocation()
const isNftPage = pathname.startsWith('/nfts') || pathname.startsWith('/profile')
const isNftPage = pathname.startsWith('/nfts')
// manage background color
useEffect(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment