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
c42aeae9
Unverified
Commit
c42aeae9
authored
Mar 16, 2023
by
Vignesh Mohankumar
Committed by
GitHub
Mar 16, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: update `useIsPoolsPage` hook (#6179)
* fix: update `useIsPoolsPage` hook * rename file
parent
80ab000d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
index.tsx
src/components/NavBar/index.tsx
+2
-2
index.tsx
src/components/TopLevelModals/index.tsx
+2
-2
useIsPoolsPage.ts
src/hooks/useIsPoolsPage.ts
+2
-1
No files found.
src/components/NavBar/index.tsx
View file @
c42aeae9
...
...
@@ -3,7 +3,7 @@ import { useWeb3React } from '@web3-react/core'
import
Web3Status
from
'
components/Web3Status
'
import
{
chainIdToBackendName
}
from
'
graphql/data/util
'
import
{
useIsNftPage
}
from
'
hooks/useIsNftPage
'
import
{
useIsPool
Page
}
from
'
hooks/useIsPool
Page
'
import
{
useIsPool
sPage
}
from
'
hooks/useIsPools
Page
'
import
{
Box
}
from
'
nft/components/Box
'
import
{
Row
}
from
'
nft/components/Flex
'
import
{
UniIcon
}
from
'
nft/components/icons
'
...
...
@@ -53,7 +53,7 @@ export const PageTabs = () => {
const
{
chainId
:
connectedChainId
}
=
useWeb3React
()
const
chainName
=
chainIdToBackendName
(
connectedChainId
)
const
isPoolActive
=
useIsPoolPage
()
const
isPoolActive
=
useIsPool
s
Page
()
const
isNftPage
=
useIsNftPage
()
return
(
...
...
src/components/TopLevelModals/index.tsx
View file @
c42aeae9
...
...
@@ -6,7 +6,7 @@ import TaxServiceBanner from 'components/TaxServiceModal/TaxServiceBanner'
import
{
useTaxServiceBannerEnabled
}
from
'
featureFlags/flags/taxServiceBanner
'
import
useAccountRiskCheck
from
'
hooks/useAccountRiskCheck
'
import
{
useIsNftPage
}
from
'
hooks/useIsNftPage
'
import
{
useIsPool
Page
}
from
'
hooks/useIsPool
Page
'
import
{
useIsPool
sPage
}
from
'
hooks/useIsPools
Page
'
import
{
lazy
}
from
'
react
'
import
{
useLocation
}
from
'
react-router-dom
'
import
{
useModalIsOpen
,
useToggleModal
}
from
'
state/application/hooks
'
...
...
@@ -27,7 +27,7 @@ export default function TopLevelModals() {
const
{
pathname
}
=
useLocation
()
const
isNftPage
=
useIsNftPage
()
const
isPoolPage
=
useIsPoolPage
()
const
isPoolPage
=
useIsPool
s
Page
()
const
isTaxModalServicePage
=
isNftPage
||
isPoolPage
||
pathname
.
startsWith
(
'
/swap
'
)
...
...
src/hooks/useIsPoolPage.ts
→
src/hooks/useIsPool
s
Page.ts
View file @
c42aeae9
import
{
useLocation
}
from
'
react-router-dom
'
export
function
useIsPoolPage
()
{
export
function
useIsPool
s
Page
()
{
const
{
pathname
}
=
useLocation
()
return
(
pathname
.
startsWith
(
'
/pools
'
)
||
pathname
.
startsWith
(
'
/pool
'
)
||
pathname
.
startsWith
(
'
/add
'
)
||
pathname
.
startsWith
(
'
/remove
'
)
||
pathname
.
startsWith
(
'
/increase
'
)
...
...
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