Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
10a19638
Unverified
Commit
10a19638
authored
Nov 16, 2022
by
aballerr
Committed by
GitHub
Nov 16, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: reverting navbar change (#5237)
* reverting mobile navbar changes
parent
be7e808f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
38 deletions
+3
-38
index.tsx
src/components/NavBar/index.tsx
+1
-23
profile.tsx
src/nft/pages/profile/profile.tsx
+2
-15
No files found.
src/components/NavBar/index.tsx
View file @
10a19638
...
...
@@ -7,8 +7,7 @@ import { useIsNftPage } from 'hooks/useIsNftPage'
import
{
Box
}
from
'
nft/components/Box
'
import
{
Row
}
from
'
nft/components/Flex
'
import
{
UniIcon
}
from
'
nft/components/icons
'
import
{
useIsMobile
}
from
'
nft/hooks
'
import
{
ReactNode
,
useMemo
}
from
'
react
'
import
{
ReactNode
}
from
'
react
'
import
{
NavLink
,
NavLinkProps
,
useLocation
}
from
'
react-router-dom
'
import
{
Bag
}
from
'
./Bag
'
...
...
@@ -72,30 +71,9 @@ const PageTabs = () => {
)
}
const
useShouldHideNavbar
=
()
=>
{
const
{
pathname
}
=
useLocation
()
const
isMobile
=
useIsMobile
()
const
shouldHideNavbar
=
useMemo
(()
=>
{
const
paths
=
[
'
/nfts/profile
'
]
if
(
!
isMobile
)
return
false
for
(
const
path
of
paths
)
{
if
(
pathname
.
includes
(
path
))
return
true
}
return
false
},
[
isMobile
,
pathname
])
return
shouldHideNavbar
}
const
Navbar
=
()
=>
{
const
shouldHideNavbar
=
useShouldHideNavbar
()
const
isNftPage
=
useIsNftPage
()
if
(
shouldHideNavbar
)
return
null
return
(
<>
<
nav
className=
{
styles
.
nav
}
>
...
...
src/nft/pages/profile/profile.tsx
View file @
10a19638
...
...
@@ -4,16 +4,14 @@ import { useWeb3React } from '@web3-react/core'
import
{
useLoadNftBalanceQuery
}
from
'
graphql/data/nft/NftBalance
'
import
{
Box
}
from
'
nft/components/Box
'
import
{
Center
,
Column
,
Row
}
from
'
nft/components/Flex
'
import
{
ChevronLeftIcon
,
XMarkIcon
}
from
'
nft/components/icons
'
import
{
ChevronLeftIcon
}
from
'
nft/components/icons
'
import
{
ListPage
}
from
'
nft/components/profile/list/ListPage
'
import
{
ProfilePage
}
from
'
nft/components/profile/view/ProfilePage
'
import
{
ProfilePageLoadingSkeleton
}
from
'
nft/components/profile/view/ProfilePageLoadingSkeleton
'
import
{
buttonMedium
,
headlineMedium
,
headlineSmall
}
from
'
nft/css/common.css
'
import
{
themeVars
}
from
'
nft/css/sprinkles.css
'
import
{
buttonMedium
,
headlineMedium
}
from
'
nft/css/common.css
'
import
{
useBag
,
useNFTList
,
useProfilePageState
,
useSellAsset
,
useWalletCollections
}
from
'
nft/hooks
'
import
{
ListingStatus
,
ProfilePageStateType
}
from
'
nft/types
'
import
{
Suspense
,
useEffect
,
useRef
}
from
'
react
'
import
{
useNavigate
}
from
'
react-router-dom
'
import
{
useToggleWalletModal
}
from
'
state/application/hooks
'
import
*
as
styles
from
'
./profile.css
'
...
...
@@ -27,7 +25,6 @@ const ProfileContent = () => {
const
resetSellAssets
=
useSellAsset
((
state
)
=>
state
.
reset
)
const
clearCollectionFilters
=
useWalletCollections
((
state
)
=>
state
.
clearCollectionFilters
)
const
setListingStatus
=
useNFTList
((
state
)
=>
state
.
setListingStatus
)
const
navigate
=
useNavigate
()
useEffect
(()
=>
{
removeAllMarketplaceWarnings
()
...
...
@@ -48,10 +45,6 @@ const ProfileContent = () => {
},
[
account
,
resetSellAssets
,
setSellPageState
,
clearCollectionFilters
])
const
cartExpanded
=
useBag
((
state
)
=>
state
.
bagExpanded
)
const
exitSellFlow
=
()
=>
{
navigate
(
-
1
)
}
return
(
<
Trace
page=
{
PageName
.
NFT_PROFILE_PAGE
}
shouldLogImpression
>
<
Box
className=
{
styles
.
mobileSellWrapper
}
>
...
...
@@ -64,12 +57,6 @@ const ProfileContent = () => {
<
ChevronLeftIcon
height=
{
28
}
width=
{
28
}
/>
</
Box
>
)
}
<
Box
className=
{
headlineSmall
}
paddingBottom=
"4"
style=
{
{
lineHeight
:
'
28px
'
}
}
>
{
sellPageState
===
ProfilePageStateType
.
VIEWING
?
'
Select NFTs
'
:
'
Create Listing
'
}
</
Box
>
<
Box
cursor=
"pointer"
marginLeft=
"auto"
marginRight=
"0"
onClick=
{
exitSellFlow
}
>
<
XMarkIcon
height=
{
28
}
width=
{
28
}
fill=
{
themeVars
.
colors
.
textPrimary
}
/>
</
Box
>
</
Row
>
{
account
!=
null
?
(
<
Box
style=
{
{
width
:
`calc(100% - ${cartExpanded ? SHOPPING_BAG_WIDTH : 0}px)`
}
}
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment