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
5cb9197b
Commit
5cb9197b
authored
Aug 29, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add link to logo
parent
12f23e5b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
18 deletions
+25
-18
Burger.tsx
ui/blocks/header/Burger.tsx
+3
-2
NetworkLogo.tsx
ui/blocks/networkMenu/NetworkLogo.tsx
+22
-16
No files found.
ui/blocks/header/Burger.tsx
View file @
5cb9197b
...
...
@@ -16,9 +16,10 @@ const Burger = () => {
setNetworkMenuVisibility
((
flag
)
=>
!
flag
);
},
[]);
const
handleNetworkLogoClick
=
React
.
useCallback
(()
=>
{
const
handleNetworkLogoClick
=
React
.
useCallback
((
event
:
React
.
SyntheticEvent
)
=>
{
isNetworkMenuOpened
&&
event
.
preventDefault
();
setNetworkMenuVisibility
(
false
);
},
[]);
},
[
isNetworkMenuOpened
]);
return
(
<>
...
...
ui/blocks/networkMenu/NetworkLogo.tsx
View file @
5cb9197b
import
{
Icon
,
Box
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
NextLink
from
'
next/link
'
;
import
React
from
'
react
'
;
import
logoIcon
from
'
icons/logo.svg
'
;
import
useBasePath
from
'
lib/hooks/useBasePath
'
;
import
getDefaultTransitionProps
from
'
theme/utils/getDefaultTransitionProps
'
;
interface
Props
{
isCollapsed
?:
boolean
;
onClick
?:
()
=>
void
;
onClick
?:
(
event
:
React
.
SyntheticEvent
)
=>
void
;
}
const
NetworkLogo
=
({
isCollapsed
,
onClick
}:
Props
)
=>
{
const
logoColor
=
useColorModeValue
(
'
blue.600
'
,
'
white
'
);
const
href
=
useBasePath
();
return
(
<
Box
width=
{
isCollapsed
?
'
0
'
:
'
113px
'
}
display=
"inline-flex"
overflow=
"hidden"
onClick=
{
onClick
}
{
...
getDefaultTransitionProps
({
transitionProperty
:
'
width
'
})
}
>
<
Icon
as=
{
logoIcon
}
width=
"113px"
height=
"20px"
color=
{
logoColor
}
{
...
getDefaultTransitionProps
()
}
/>
</
Box
>
<
NextLink
href=
{
href
}
passHref
>
<
Box
as=
"a"
width=
{
isCollapsed
?
'
0
'
:
'
113px
'
}
display=
"inline-flex"
overflow=
"hidden"
onClick=
{
onClick
}
{
...
getDefaultTransitionProps
({
transitionProperty
:
'
width
'
})
}
>
<
Icon
as=
{
logoIcon
}
width=
"113px"
height=
"20px"
color=
{
logoColor
}
{
...
getDefaultTransitionProps
()
}
/>
</
Box
>
</
NextLink
>
);
};
...
...
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