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
a884fbaa
Commit
a884fbaa
authored
Dec 11, 2023
by
Max Alekseenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename prop
parent
04d087ef
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
12 deletions
+12
-12
LayoutApp.tsx
ui/shared/layout/LayoutApp.tsx
+1
-1
Burger.tsx
ui/snippets/header/Burger.tsx
+3
-3
Header.tsx
ui/snippets/header/Header.tsx
+4
-4
NavigationMobile.tsx
ui/snippets/navigation/NavigationMobile.tsx
+4
-4
No files found.
ui/shared/layout/LayoutApp.tsx
View file @
a884fbaa
...
...
@@ -17,7 +17,7 @@ const LayoutDefault = ({ children }: Props) => {
paddingX=
{
{
base
:
4
,
lg
:
6
}
}
>
<
HeaderAlert
/>
<
Header
isAppPage
/>
<
Header
is
Marketplace
AppPage
/>
<
AppErrorBoundary
>
<
Layout
.
Content
pt=
{
{
base
:
0
,
lg
:
6
}
}
>
{
children
}
...
...
ui/snippets/header/Burger.tsx
View file @
a884fbaa
...
...
@@ -11,10 +11,10 @@ import NetworkMenuContentMobile from 'ui/snippets/networkMenu/NetworkMenuContent
import
useNetworkMenu
from
'
ui/snippets/networkMenu/useNetworkMenu
'
;
interface
Props
{
isAppPage
?:
boolean
;
is
Marketplace
AppPage
?:
boolean
;
}
const
Burger
=
({
isAppPage
}:
Props
)
=>
{
const
Burger
=
({
is
Marketplace
AppPage
}:
Props
)
=>
{
const
iconColor
=
useColorModeValue
(
'
gray.600
'
,
'
white
'
);
const
{
isOpen
,
onOpen
,
onClose
}
=
useDisclosure
();
const
networkMenu
=
useNetworkMenu
();
...
...
@@ -61,7 +61,7 @@ const Burger = ({ isAppPage }: Props) => {
</
Flex
>
{
networkMenu
.
isOpen
?
<
NetworkMenuContentMobile
tabs=
{
networkMenu
.
availableTabs
}
items=
{
networkMenu
.
data
}
/>
:
<
NavigationMobile
onNavLinkClick=
{
onClose
}
is
AppPage=
{
is
AppPage
}
/>
<
NavigationMobile
onNavLinkClick=
{
onClose
}
is
MarketplaceAppPage=
{
isMarketplace
AppPage
}
/>
}
</
DrawerBody
>
</
DrawerContent
>
...
...
ui/snippets/header/Header.tsx
View file @
a884fbaa
...
...
@@ -14,11 +14,11 @@ import Burger from './Burger';
type
Props
=
{
isHomePage
?:
boolean
;
isAppPage
?:
boolean
;
is
Marketplace
AppPage
?:
boolean
;
renderSearchBar
?:
()
=>
React
.
ReactNode
;
}
const
Header
=
({
isHomePage
,
isAppPage
,
renderSearchBar
}:
Props
)
=>
{
const
Header
=
({
isHomePage
,
is
Marketplace
AppPage
,
renderSearchBar
}:
Props
)
=>
{
const
bgColor
=
useColorModeValue
(
'
white
'
,
'
black
'
);
const
scrollDirection
=
useScrollDirection
();
...
...
@@ -61,9 +61,9 @@ const Header = ({ isHomePage, isAppPage, renderSearchBar }: Props) => {
justifyContent=
"center"
gap=
{
12
}
>
{
isAppPage
&&
(
{
is
Marketplace
AppPage
&&
(
<
Box
display=
"flex"
alignItems=
"center"
gap=
{
3
}
>
<
Burger
isAppPage
/>
<
Burger
is
Marketplace
AppPage
/>
<
NetworkLogo
isCollapsed
/>
</
Box
>
)
}
...
...
ui/snippets/navigation/NavigationMobile.tsx
View file @
a884fbaa
...
...
@@ -11,10 +11,10 @@ import NavLinkGroupMobile from './NavLinkGroupMobile';
interface
Props
{
onNavLinkClick
?:
()
=>
void
;
isAppPage
?:
boolean
;
is
Marketplace
AppPage
?:
boolean
;
}
const
NavigationMobile
=
({
onNavLinkClick
,
isAppPage
}:
Props
)
=>
{
const
NavigationMobile
=
({
onNavLinkClick
,
is
Marketplace
AppPage
}:
Props
)
=>
{
const
{
mainNavItems
,
accountNavItems
}
=
useNavItems
();
const
[
openedGroupIndex
,
setOpenedGroupIndex
]
=
React
.
useState
(
-
1
);
...
...
@@ -62,9 +62,9 @@ const NavigationMobile = ({ onNavLinkClick, isAppPage }: Props) => {
>
{
mainNavItems
.
map
((
item
,
index
)
=>
{
if
(
isGroupItem
(
item
))
{
return
<
NavLinkGroupMobile
key=
{
item
.
text
}
item=
{
item
}
onClick=
{
onGroupItemOpen
(
index
)
}
isExpanded=
{
isAppPage
}
/>;
return
<
NavLinkGroupMobile
key=
{
item
.
text
}
item=
{
item
}
onClick=
{
onGroupItemOpen
(
index
)
}
isExpanded=
{
is
Marketplace
AppPage
}
/>;
}
else
{
return
<
NavLink
key=
{
item
.
text
}
item=
{
item
}
onClick=
{
onNavLinkClick
}
isCollapsed=
{
isAppPage
?
false
:
undefined
}
/>;
return
<
NavLink
key=
{
item
.
text
}
item=
{
item
}
onClick=
{
onNavLinkClick
}
isCollapsed=
{
is
Marketplace
AppPage
?
false
:
undefined
}
/>;
}
})
}
</
VStack
>
...
...
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