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
58377952
Commit
58377952
authored
Apr 13, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hide network menu and profile menu if related envs are not provided
parent
21528c82
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
10 deletions
+14
-10
Home.tsx
ui/pages/Home.tsx
+1
-1
Burger.tsx
ui/snippets/header/Burger.tsx
+8
-5
Header.tsx
ui/snippets/header/Header.tsx
+3
-2
NavigationDesktop.tsx
ui/snippets/navigation/NavigationDesktop.tsx
+1
-1
NavigationMobile.tsx
ui/snippets/navigation/NavigationMobile.tsx
+1
-1
No files found.
ui/pages/Home.tsx
View file @
58377952
...
...
@@ -40,7 +40,7 @@ const Home = () => {
pl=
{
4
}
>
<
ColorModeToggler
trackBg=
"whiteAlpha.500"
/>
<
ProfileMenuDesktop
/>
{
appConfig
.
isAccountSupported
&&
<
ProfileMenuDesktop
/>
}
</
Flex
>
</
Flex
>
<
LightMode
>
...
...
ui/snippets/header/Burger.tsx
View file @
58377952
import
{
Icon
,
Box
,
Flex
,
Drawer
,
DrawerOverlay
,
DrawerContent
,
DrawerBody
,
useColorModeValue
,
useDisclosure
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
appConfig
from
'
configs/app/config
'
;
import
burgerIcon
from
'
icons/burger.svg
'
;
import
testnetIcon
from
'
icons/testnet.svg
'
;
import
NavigationMobile
from
'
ui/snippets/navigation/NavigationMobile
'
;
...
...
@@ -45,11 +46,13 @@ const Burger = () => {
<
Icon
as=
{
testnetIcon
}
h=
"14px"
w=
"auto"
color=
"red.400"
alignSelf=
"flex-start"
/>
<
Flex
alignItems=
"center"
justifyContent=
"space-between"
>
<
NetworkLogo
onClick=
{
handleNetworkLogoClick
}
/>
<
NetworkMenuButton
isMobile
isActive=
{
isNetworkMenuOpened
}
onClick=
{
handleNetworkMenuButtonClick
}
/>
{
appConfig
.
featuredNetworks
.
length
>
0
?
(
<
NetworkMenuButton
isMobile
isActive=
{
isNetworkMenuOpened
}
onClick=
{
handleNetworkMenuButtonClick
}
/>
)
:
<
Box
boxSize=
{
9
}
/>
}
</
Flex
>
{
isNetworkMenuOpened
?
<
NetworkMenuContentMobile
/>
:
<
NavigationMobile
/>
}
</
DrawerBody
>
...
...
ui/snippets/header/Header.tsx
View file @
58377952
import
{
HStack
,
Box
,
Flex
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
appConfig
from
'
configs/app/config
'
;
import
{
useScrollDirection
}
from
'
lib/contexts/scrollDirection
'
;
import
IndexingAlert
from
'
ui/home/IndexingAlert
'
;
import
NetworkLogo
from
'
ui/snippets/networkMenu/NetworkLogo
'
;
...
...
@@ -43,7 +44,7 @@ const Header = ({ isHomePage, renderSearchBar }: Props) => {
>
<
Burger
/>
<
NetworkLogo
/>
<
ProfileMenuMobile
/>
{
appConfig
.
isAccountSupported
?
<
ProfileMenuMobile
/>
:
<
Box
boxSize=
{
10
}
/>
}
</
Flex
>
{
!
isHomePage
&&
searchBar
}
</
Box
>
...
...
@@ -66,7 +67,7 @@ const Header = ({ isHomePage, renderSearchBar }: Props) => {
{
searchBar
}
</
Box
>
<
ColorModeToggler
/>
<
ProfileMenuDesktop
/>
{
appConfig
.
isAccountSupported
&&
<
ProfileMenuDesktop
/>
}
</
HStack
>
)
}
</
Box
>
...
...
ui/snippets/navigation/NavigationDesktop.tsx
View file @
58377952
...
...
@@ -77,7 +77,7 @@ const NavigationDesktop = () => {
transitionTimingFunction=
"ease"
>
<
NetworkLogo
isCollapsed=
{
isCollapsed
}
/>
<
NetworkMenu
isCollapsed=
{
isCollapsed
}
/>
{
appConfig
.
featuredNetworks
.
length
>
0
&&
<
NetworkMenu
isCollapsed=
{
isCollapsed
}
/>
}
</
Box
>
<
Box
as=
"nav"
mt=
{
8
}
w=
"100%"
>
<
VStack
as=
"ul"
spacing=
"1"
alignItems=
"flex-start"
>
...
...
ui/snippets/navigation/NavigationMobile.tsx
View file @
58377952
...
...
@@ -67,7 +67,7 @@ const NavigationMobile = () => {
})
}
</
VStack
>
</
Box
>
{
isAuth
&&
(
{
hasAccount
&&
(
<
Box
as=
"nav"
mt=
{
6
}
...
...
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