Skip to content

Commit 872917d

Browse files
authored
Merge pull request #2302 from oasisprotocol/mz/homepage
Implement new homepage
2 parents 6ffe6ab + a214ecc commit 872917d

37 files changed

+228
-2870
lines changed

.changelog/2302.feature.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Implement new homepage

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,8 @@
7070
"react": "18.3.1",
7171
"react-dom": "18.3.1",
7272
"react-i18next": "14.1.3",
73-
"react-quick-pinch-zoom": "5.1.0",
7473
"react-router-dom": "6.30.0",
7574
"recharts": "2.15.1",
76-
"swiper": "11.2.5",
77-
"use-resize-observer": "9.1.0",
7875
"viem": "^2.31.4"
7976
},
8077
"devDependencies": {

src/app/components/CustomIcons/Navigate.tsx

Lines changed: 0 additions & 70 deletions
This file was deleted.

src/app/components/CustomIcons/Pinch.tsx

Lines changed: 0 additions & 46 deletions
This file was deleted.

src/app/components/CustomIcons/Tap.tsx

Lines changed: 0 additions & 52 deletions
This file was deleted.

src/app/components/LayerPicker/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const LayerPicker: FC<LayerPickerProps> = ({ onClose, onConfirm, open, is
3131
<>
3232
<Drawer direction="top" open={open} onClose={onClose}>
3333
{/* Match MUI md breakpoint during migration */}
34-
<DrawerContent className="py-4 px-[5%] z-[1200] max-lg:h-dvh max-lg:!max-h-dvh max-lg:mb-0">
34+
<DrawerContent className="py-4 px-6 z-[1200] max-lg:h-dvh max-lg:!max-h-dvh max-lg:mb-0">
3535
<LayerPickerContent onClose={onClose} onConfirm={onConfirm} isOutOfDate={isOutOfDate} />
3636
</DrawerContent>
3737
</Drawer>

src/app/components/PageLayout/Header.tsx

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@ import { useScopeParam } from '../../hooks/useScopeParam'
77
import { useScreenSize } from '../../hooks/useScreensize'
88
import { isScopeSelectorNeeded } from '../../utils/route-utils'
99
import { useTranslation } from 'react-i18next'
10+
import { cn } from '@oasisprotocol/ui-library/src/lib/utils'
1011

11-
export const Header: FC = () => {
12+
type HeaderProps = {
13+
sticky?: boolean
14+
}
15+
16+
export const Header: FC<HeaderProps> = ({ sticky = true }) => {
1217
const { t } = useTranslation()
1318
const { isMobile } = useScreenSize()
1419
const { isDesktop } = useScreenSize()
@@ -17,11 +22,18 @@ export const Header: FC = () => {
1722
const scrolled = useScrolled()
1823

1924
return (
20-
<header className="flex flex-col w-full box-border flex-shrink-0 sticky z-[1100] top-0 right-0 left-auto shadow-md bg-theme-layout-accent">
21-
<div className="px-4">
22-
<div className="grid grid-cols-12 pt-3 pb-4 px-0 md:px-[4%]">
25+
<header
26+
className={cn(
27+
'h-17 flex flex-col w-full box-border flex-shrink-0 bg-theme-layout-accent justify-center',
28+
{
29+
'sticky z-[1100] top-0 right-0 left-auto shadow-md': sticky,
30+
},
31+
)}
32+
>
33+
<div className="px-2 md:px-6">
34+
<div className="grid grid-cols-12">
2335
<div className="col-span-6 xl:col-span-3 flex items-center">
24-
<HomePageLink showText={!scrolled && !isMobile} />
36+
<HomePageLink showText={!sticky || (!scrolled && !isMobile)} />
2537
</div>
2638

2739
{withScopeSelector && (

0 commit comments

Comments
 (0)