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
e0e02202
Commit
e0e02202
authored
Dec 12, 2023
by
Max Alekseenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix header after merge
parent
990aeaff
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
89 deletions
+25
-89
LayoutApp.tsx
ui/shared/layout/LayoutApp.tsx
+4
-2
Header.tsx
ui/snippets/header/Header.tsx
+0
-84
HeaderDesktop.tsx
ui/snippets/header/HeaderDesktop.tsx
+16
-2
HeaderMobile.tsx
ui/snippets/header/HeaderMobile.tsx
+5
-1
No files found.
ui/shared/layout/LayoutApp.tsx
View file @
e0e02202
...
@@ -3,21 +3,23 @@ import React from 'react';
...
@@ -3,21 +3,23 @@ import React from 'react';
import
type
{
Props
}
from
'
./types
'
;
import
type
{
Props
}
from
'
./types
'
;
import
AppErrorBoundary
from
'
ui/shared/AppError/AppErrorBoundary
'
;
import
AppErrorBoundary
from
'
ui/shared/AppError/AppErrorBoundary
'
;
import
Header
from
'
ui/snippets/header/Header
'
;
import
HeaderAlert
from
'
ui/snippets/header/HeaderAlert
'
;
import
HeaderAlert
from
'
ui/snippets/header/HeaderAlert
'
;
import
HeaderDesktop
from
'
ui/snippets/header/HeaderDesktop
'
;
import
HeaderMobile
from
'
ui/snippets/header/HeaderMobile
'
;
import
*
as
Layout
from
'
./components
'
;
import
*
as
Layout
from
'
./components
'
;
const
LayoutDefault
=
({
children
}:
Props
)
=>
{
const
LayoutDefault
=
({
children
}:
Props
)
=>
{
return
(
return
(
<
Layout
.
Container
>
<
Layout
.
Container
>
<
HeaderMobile
/>
<
Layout
.
MainArea
>
<
Layout
.
MainArea
>
<
Layout
.
MainColumn
<
Layout
.
MainColumn
paddingTop=
{
{
base
:
'
138px
'
,
lg
:
6
}
}
paddingTop=
{
{
base
:
'
138px
'
,
lg
:
6
}
}
paddingX=
{
{
base
:
4
,
lg
:
6
}
}
paddingX=
{
{
base
:
4
,
lg
:
6
}
}
>
>
<
HeaderAlert
/>
<
HeaderAlert
/>
<
Header
isMarketplaceAppPage
/>
<
Header
Desktop
isMarketplaceAppPage
/>
<
AppErrorBoundary
>
<
AppErrorBoundary
>
<
Layout
.
Content
pt=
{
{
base
:
0
,
lg
:
6
}
}
>
<
Layout
.
Content
pt=
{
{
base
:
0
,
lg
:
6
}
}
>
{
children
}
{
children
}
...
...
ui/snippets/header/Header.tsx
deleted
100644 → 0
View file @
990aeaff
import
{
HStack
,
Box
,
Flex
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
config
from
'
configs/app
'
;
import
{
useScrollDirection
}
from
'
lib/contexts/scrollDirection
'
;
import
NetworkLogo
from
'
ui/snippets/networkMenu/NetworkLogo
'
;
import
ProfileMenuDesktop
from
'
ui/snippets/profileMenu/ProfileMenuDesktop
'
;
import
ProfileMenuMobile
from
'
ui/snippets/profileMenu/ProfileMenuMobile
'
;
import
SearchBar
from
'
ui/snippets/searchBar/SearchBar
'
;
import
WalletMenuDesktop
from
'
ui/snippets/walletMenu/WalletMenuDesktop
'
;
import
WalletMenuMobile
from
'
ui/snippets/walletMenu/WalletMenuMobile
'
;
import
Burger
from
'
./Burger
'
;
type
Props
=
{
isHomePage
?:
boolean
;
isMarketplaceAppPage
?:
boolean
;
renderSearchBar
?:
()
=>
React
.
ReactNode
;
}
const
Header
=
({
isHomePage
,
isMarketplaceAppPage
,
renderSearchBar
}:
Props
)
=>
{
const
bgColor
=
useColorModeValue
(
'
white
'
,
'
black
'
);
const
scrollDirection
=
useScrollDirection
();
const
searchBar
=
renderSearchBar
?
renderSearchBar
()
:
<
SearchBar
/>;
return
(
<>
<
Box
bgColor=
{
bgColor
}
display=
{
{
base
:
'
block
'
,
lg
:
'
none
'
}
}
>
<
Flex
as=
"header"
position=
"fixed"
top=
{
0
}
left=
{
0
}
paddingX=
{
4
}
paddingY=
{
2
}
bgColor=
{
bgColor
}
width=
"100%"
alignItems=
"center"
justifyContent=
"space-between"
zIndex=
"sticky2"
transitionProperty=
"box-shadow"
transitionDuration=
"slow"
boxShadow=
{
scrollDirection
===
'
down
'
?
'
md
'
:
'
none
'
}
>
<
Burger
/>
<
NetworkLogo
/>
<
Flex
columnGap=
{
2
}
>
{
config
.
features
.
account
.
isEnabled
?
<
ProfileMenuMobile
/>
:
<
Box
boxSize=
{
10
}
/>
}
{
config
.
features
.
blockchainInteraction
.
isEnabled
&&
<
WalletMenuMobile
/>
}
</
Flex
>
</
Flex
>
{
!
isHomePage
&&
searchBar
}
</
Box
>
<
Box
display=
{
{
base
:
'
none
'
,
lg
:
'
block
'
}
}
>
{
!
isHomePage
&&
(
<
HStack
as=
"header"
width=
"100%"
alignItems=
"center"
justifyContent=
"center"
gap=
{
12
}
>
{
isMarketplaceAppPage
&&
(
<
Box
display=
"flex"
alignItems=
"center"
gap=
{
3
}
>
<
Burger
isMarketplaceAppPage
/>
<
NetworkLogo
isCollapsed
/>
</
Box
>
)
}
<
Box
width=
"100%"
>
{
searchBar
}
</
Box
>
<
Box
display=
"flex"
>
{
config
.
features
.
account
.
isEnabled
&&
<
ProfileMenuDesktop
/>
}
{
config
.
features
.
blockchainInteraction
.
isEnabled
&&
<
WalletMenuDesktop
/>
}
</
Box
>
</
HStack
>
)
}
</
Box
>
</>
);
};
export
default
Header
;
ui/snippets/header/HeaderDesktop.tsx
View file @
e0e02202
...
@@ -2,14 +2,19 @@ import { HStack, Box } from '@chakra-ui/react';
...
@@ -2,14 +2,19 @@ import { HStack, Box } from '@chakra-ui/react';
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
NetworkLogo
from
'
ui/snippets/networkMenu/NetworkLogo
'
;
import
ProfileMenuDesktop
from
'
ui/snippets/profileMenu/ProfileMenuDesktop
'
;
import
ProfileMenuDesktop
from
'
ui/snippets/profileMenu/ProfileMenuDesktop
'
;
import
SearchBar
from
'
ui/snippets/searchBar/SearchBar
'
;
import
SearchBar
from
'
ui/snippets/searchBar/SearchBar
'
;
import
WalletMenuDesktop
from
'
ui/snippets/walletMenu/WalletMenuDesktop
'
;
import
Burger
from
'
./Burger
'
;
type
Props
=
{
type
Props
=
{
renderSearchBar
?:
()
=>
React
.
ReactNode
;
renderSearchBar
?:
()
=>
React
.
ReactNode
;
isMarketplaceAppPage
?:
boolean
;
}
}
const
HeaderDesktop
=
({
renderSearchBar
}:
Props
)
=>
{
const
HeaderDesktop
=
({
renderSearchBar
,
isMarketplaceAppPage
}:
Props
)
=>
{
const
searchBar
=
renderSearchBar
?
renderSearchBar
()
:
<
SearchBar
/>;
const
searchBar
=
renderSearchBar
?
renderSearchBar
()
:
<
SearchBar
/>;
...
@@ -22,10 +27,19 @@ const HeaderDesktop = ({ renderSearchBar }: Props) => {
...
@@ -22,10 +27,19 @@ const HeaderDesktop = ({ renderSearchBar }: Props) => {
justifyContent=
"center"
justifyContent=
"center"
gap=
{
12
}
gap=
{
12
}
>
>
{
isMarketplaceAppPage
&&
(
<
Box
display=
"flex"
alignItems=
"center"
gap=
{
3
}
>
<
Burger
isMarketplaceAppPage
/>
<
NetworkLogo
isCollapsed
/>
</
Box
>
)
}
<
Box
width=
"100%"
>
<
Box
width=
"100%"
>
{
searchBar
}
{
searchBar
}
</
Box
>
</
Box
>
{
config
.
features
.
account
.
isEnabled
&&
<
ProfileMenuDesktop
/>
}
<
Box
display=
"flex"
>
{
config
.
features
.
account
.
isEnabled
&&
<
ProfileMenuDesktop
/>
}
{
config
.
features
.
blockchainInteraction
.
isEnabled
&&
<
WalletMenuDesktop
/>
}
</
Box
>
</
HStack
>
</
HStack
>
);
);
};
};
...
...
ui/snippets/header/HeaderMobile.tsx
View file @
e0e02202
...
@@ -7,6 +7,7 @@ import { useScrollDirection } from 'lib/contexts/scrollDirection';
...
@@ -7,6 +7,7 @@ import { useScrollDirection } from 'lib/contexts/scrollDirection';
import
NetworkLogo
from
'
ui/snippets/networkMenu/NetworkLogo
'
;
import
NetworkLogo
from
'
ui/snippets/networkMenu/NetworkLogo
'
;
import
ProfileMenuMobile
from
'
ui/snippets/profileMenu/ProfileMenuMobile
'
;
import
ProfileMenuMobile
from
'
ui/snippets/profileMenu/ProfileMenuMobile
'
;
import
SearchBar
from
'
ui/snippets/searchBar/SearchBar
'
;
import
SearchBar
from
'
ui/snippets/searchBar/SearchBar
'
;
import
WalletMenuMobile
from
'
ui/snippets/walletMenu/WalletMenuMobile
'
;
import
Burger
from
'
./Burger
'
;
import
Burger
from
'
./Burger
'
;
...
@@ -47,7 +48,10 @@ const HeaderMobile = ({ isHomePage, renderSearchBar }: Props) => {
...
@@ -47,7 +48,10 @@ const HeaderMobile = ({ isHomePage, renderSearchBar }: Props) => {
>
>
<
Burger
/>
<
Burger
/>
<
NetworkLogo
/>
<
NetworkLogo
/>
{
config
.
features
.
account
.
isEnabled
?
<
ProfileMenuMobile
/>
:
<
Box
boxSize=
{
10
}
/>
}
<
Flex
columnGap=
{
2
}
>
{
config
.
features
.
account
.
isEnabled
?
<
ProfileMenuMobile
/>
:
<
Box
boxSize=
{
10
}
/>
}
{
config
.
features
.
blockchainInteraction
.
isEnabled
&&
<
WalletMenuMobile
/>
}
</
Flex
>
</
Flex
>
</
Flex
>
{
!
isHomePage
&&
searchBar
}
{
!
isHomePage
&&
searchBar
}
</
Box
>
</
Box
>
...
...
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