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
46171bfc
Commit
46171bfc
authored
May 27, 2024
by
Max Alekseenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove redundant code
parent
6dd5af69
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
21 deletions
+9
-21
DeFiDropdownItem.tsx
ui/snippets/topBar/DeFiDropdownItem.tsx
+9
-21
No files found.
ui/snippets/topBar/DeFiDropdownItem.tsx
View file @
46171bfc
import
{
Link
,
Text
,
HStack
,
chakra
,
shouldForwardProp
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
{
Link
,
Text
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
NextLink
from
'
next/link
'
;
import
NextLink
from
'
next/link
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
...
@@ -24,6 +24,8 @@ const DeFiDropdownItem = ({ item }: Props) => {
...
@@ -24,6 +24,8 @@ const DeFiDropdownItem = ({ item }: Props) => {
w=
"100%"
w=
"100%"
h=
"34px"
h=
"34px"
display=
"flex"
display=
"flex"
alignItems=
"center"
gap=
{
2
}
aria
-
label=
{
`${ item.text } link`
}
aria
-
label=
{
`${ item.text } link`
}
whiteSpace=
"nowrap"
whiteSpace=
"nowrap"
color=
{
useColorModeValue
(
'
blackAlpha.800
'
,
'
gray.400
'
)
}
color=
{
useColorModeValue
(
'
blackAlpha.800
'
,
'
gray.400
'
)
}
...
@@ -34,13 +36,11 @@ const DeFiDropdownItem = ({ item }: Props) => {
...
@@ -34,13 +36,11 @@ const DeFiDropdownItem = ({ item }: Props) => {
},
},
}
}
}
}
>
>
<
HStack
spacing=
{
2
}
overflow=
"hidden"
>
<
IconSvg
name=
{
item
.
icon
}
boxSize=
{
5
}
/>
<
IconSvg
name=
{
item
.
icon
}
boxSize=
{
5
}
/>
<
Text
as=
"span"
fontSize=
"sm"
>
<
Text
as=
"span"
fontSize=
"sm"
>
<
span
>
{
item
.
text
}
</
span
>
<
span
>
{
item
.
text
}
</
span
>
{
!
item
.
dappId
&&
<
IconSvg
name=
"arrows/north-east"
boxSize=
{
4
}
color=
"text_secondary"
verticalAlign=
"middle"
/>
}
{
!
item
.
dappId
&&
<
IconSvg
name=
"arrows/north-east"
boxSize=
{
4
}
color=
"text_secondary"
verticalAlign=
"middle"
/>
}
</
Text
>
</
Text
>
</
HStack
>
</
Link
>
</
Link
>
);
);
...
@@ -51,16 +51,4 @@ const DeFiDropdownItem = ({ item }: Props) => {
...
@@ -51,16 +51,4 @@ const DeFiDropdownItem = ({ item }: Props) => {
)
:
content
;
)
:
content
;
};
};
const
DeFiDropdownItemChakra
=
chakra
(
DeFiDropdownItem
,
{
export
default
React
.
memo
(
DeFiDropdownItem
);
shouldForwardProp
:
(
prop
)
=>
{
const
isChakraProp
=
!
shouldForwardProp
(
prop
);
if
(
isChakraProp
&&
prop
!==
'
px
'
)
{
return
false
;
}
return
true
;
},
});
export
default
React
.
memo
(
DeFiDropdownItemChakra
);
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