Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
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
vicotor
frontend
Commits
6dd5af69
Commit
6dd5af69
authored
May 27, 2024
by
Max Alekseenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix text flickering
parent
4f01b17f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
DeFiDropdown.tsx
ui/snippets/topBar/DeFiDropdown.tsx
+6
-5
No files found.
ui/snippets/topBar/DeFiDropdown.tsx
View file @
6dd5af69
import
{
Button
,
Box
,
Flex
,
Popover
,
PopoverTrigger
,
PopoverContent
,
PopoverBody
,
useDisclosure
}
from
'
@chakra-ui/react
'
;
import
{
Button
,
Box
,
Flex
,
Popover
,
PopoverTrigger
,
PopoverContent
,
PopoverBody
,
useDisclosure
,
chakra
}
from
'
@chakra-ui/react
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
{
route
}
from
'
nextjs-routes
'
;
import
{
route
}
from
'
nextjs-routes
'
;
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
useIsMobile
from
'
lib/hooks/useIsMobile
'
;
import
getPageType
from
'
lib/mixpanel/getPageType
'
;
import
getPageType
from
'
lib/mixpanel/getPageType
'
;
import
*
as
mixpanel
from
'
lib/mixpanel/index
'
;
import
*
as
mixpanel
from
'
lib/mixpanel/index
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
...
@@ -17,7 +16,6 @@ const feature = config.features.deFiDropdown;
...
@@ -17,7 +16,6 @@ const feature = config.features.deFiDropdown;
const
DeFiDropdown
=
()
=>
{
const
DeFiDropdown
=
()
=>
{
const
router
=
useRouter
();
const
router
=
useRouter
();
const
source
=
getPageType
(
router
.
pathname
);
const
source
=
getPageType
(
router
.
pathname
);
const
isMobile
=
useIsMobile
();
const
{
isOpen
,
onToggle
,
onClose
}
=
useDisclosure
();
const
{
isOpen
,
onToggle
,
onClose
}
=
useDisclosure
();
const
handleClick
=
React
.
useCallback
((
content
:
string
)
=>
{
const
handleClick
=
React
.
useCallback
((
content
:
string
)
=>
{
...
@@ -51,7 +49,10 @@ const DeFiDropdown = () => {
...
@@ -51,7 +49,10 @@ const DeFiDropdown = () => {
bgColor=
{
isOpen
?
'
blue.400
'
:
undefined
}
bgColor=
{
isOpen
?
'
blue.400
'
:
undefined
}
_active=
{
{
bgColor
:
'
blue.400
'
}
}
_active=
{
{
bgColor
:
'
blue.400
'
}
}
>
>
{
!
isMobile
&&
'
Blockscout
'
}
DeFi
<
chakra
.
span
display=
{
{
base
:
'
none
'
,
lg
:
'
inline
'
}
}
mr=
{
1
}
>
Blockscout
</
chakra
.
span
>
DeFi
<
IconSvg
name=
"arrows/east-mini"
boxSize=
{
4
}
ml=
{
1
}
transform=
"rotate(-90deg)"
/>
<
IconSvg
name=
"arrows/east-mini"
boxSize=
{
4
}
ml=
{
1
}
transform=
"rotate(-90deg)"
/>
</
Button
>
</
Button
>
</
PopoverTrigger
>
</
PopoverTrigger
>
...
@@ -81,4 +82,4 @@ const DeFiDropdown = () => {
...
@@ -81,4 +82,4 @@ const DeFiDropdown = () => {
);
);
};
};
export
default
React
.
memo
(
DeFiDropdown
);
export
default
chakra
(
React
.
memo
(
DeFiDropdown
)
);
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