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
c9400468
Commit
c9400468
authored
Oct 31, 2024
by
Max Alekseenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unnecessary prop
parent
ee3c848e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
5 deletions
+2
-5
NavLink.tsx
ui/snippets/navigation/vertical/NavLink.tsx
+0
-1
NavLinkBase.tsx
ui/snippets/navigation/vertical/NavLinkBase.tsx
+2
-3
RewardsNavLink.tsx
ui/snippets/navigation/vertical/RewardsNavLink.tsx
+0
-1
No files found.
ui/snippets/navigation/vertical/NavLink.tsx
View file @
c9400468
...
...
@@ -21,7 +21,6 @@ const NavLink = ({ item, isCollapsed, onClick }: Props) => {
item=
{
item
}
nextRoute=
{
'
nextRoute
'
in
item
?
item
.
nextRoute
:
undefined
}
onClick=
{
onClick
}
target=
{
isInternalLink
?
'
_self
'
:
'
_blank
'
}
href=
{
isInternalLink
?
route
(
item
.
nextRoute
)
:
item
.
url
}
isActive=
{
isInternalLink
&&
item
.
isActive
}
isExternal=
{
!
isInternalLink
}
...
...
ui/snippets/navigation/vertical/NavLinkBase.tsx
View file @
c9400468
...
...
@@ -19,14 +19,13 @@ type Props = {
isCollapsed
?:
boolean
;
onClick
?:
()
=>
void
;
as
?:
'
a
'
|
'
button
'
;
target
?:
'
_self
'
|
'
_blank
'
;
href
?:
string
;
isExternal
?:
boolean
;
isActive
?:
boolean
;
isDisabled
?:
boolean
;
}
const
NavLinkBase
=
({
item
,
nextRoute
,
isCollapsed
,
onClick
,
isExternal
,
as
=
'
a
'
,
target
=
'
_self
'
,
href
,
isActive
,
isDisabled
}:
Props
)
=>
{
const
NavLinkBase
=
({
item
,
nextRoute
,
isCollapsed
,
onClick
,
isExternal
,
as
=
'
a
'
,
href
,
isActive
,
isDisabled
}:
Props
)
=>
{
const
isMobile
=
useIsMobile
();
const
colors
=
useColors
();
...
...
@@ -41,7 +40,7 @@ const NavLinkBase = ({ item, nextRoute, isCollapsed, onClick, isExternal, as = '
<
Link
as=
{
as
}
href=
{
href
}
target=
{
target
}
target=
{
isExternal
?
'
_blank
'
:
'
_self
'
}
{
...
styleProps
.
itemProps
}
w=
{
{
base
:
'
100%
'
,
lg
:
isExpanded
?
'
100%
'
:
'
60px
'
,
xl
:
isCollapsed
?
'
60px
'
:
'
100%
'
}
}
display=
"flex"
...
...
ui/snippets/navigation/vertical/RewardsNavLink.tsx
View file @
c9400468
...
...
@@ -45,7 +45,6 @@ const RewardsNavLink = ({ isCollapsed, onClick }: Props) => {
nextRoute=
{
isLogedIn
?
nextRoute
:
undefined
}
onClick=
{
handleClick
}
as=
{
isLogedIn
?
'
a
'
:
'
button
'
}
target=
"_self"
href=
{
isLogedIn
?
route
(
nextRoute
)
:
undefined
}
isActive=
{
router
.
pathname
===
pathname
}
isDisabled=
{
!
isInitialized
}
...
...
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