Skip to content

Commit 85c25bb

Browse files
committed
fix: header
1 parent 9226d1c commit 85c25bb

File tree

4 files changed

+54
-35
lines changed

4 files changed

+54
-35
lines changed

src/layouts/AppHeader.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export function AppHeader() {
9494
const sm = useMediaQuery(breakpoints.down('sm'));
9595
const smd = useMediaQuery('(max-width:1120px)');
9696

97-
const [visitedSwitch, setVisitedSwitch] = useState(() => {
97+
const [, setVisitedSwitch] = useState(() => {
9898
if (typeof window === 'undefined') return true;
9999
return Boolean(localStorage.getItem(SWITCH_VISITED_KEY));
100100
});
@@ -276,8 +276,8 @@ export function AppHeader() {
276276

277277
<NoSsr>
278278
<StyledBadge
279-
invisible={visitedSwitch}
280-
variant="dot"
279+
invisible={true}
280+
// variant="dot"
281281
badgeContent=""
282282
color="secondary"
283283
sx={{ mr: 2 }}

src/layouts/components/NavItems.tsx

Lines changed: 50 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,56 @@ export const NavItems = ({ setOpen }: NavItemsProps) => {
9595
</ListItem>
9696
))}
9797

98+
<ListItem
99+
sx={{
100+
width: { xs: '100%', md: 'unset' },
101+
mr: { xs: 0, md: 2 },
102+
}}
103+
disablePadding
104+
>
105+
{md ? (
106+
<Typography
107+
component={Link}
108+
href={ROUTES.sGHO}
109+
variant="h2"
110+
color="#F1F1F3"
111+
sx={{ width: '100%', p: 4 }}
112+
onClick={() => handleClick('sGHO', true)}
113+
>
114+
<Trans>sGHO</Trans>
115+
</Typography>
116+
) : (
117+
<Button
118+
component={Link}
119+
onClick={() => handleClick('sGHO', false)}
120+
href={ROUTES.sGHO}
121+
sx={(theme) => ({
122+
color: '#F1F1F3',
123+
p: '6px 8px',
124+
position: 'relative',
125+
'.active&:after, &:hover&:after': {
126+
transform: 'scaleX(1)',
127+
transformOrigin: 'bottom left',
128+
},
129+
'&:after': {
130+
content: "''",
131+
position: 'absolute',
132+
width: '100%',
133+
transform: 'scaleX(0)',
134+
height: '2px',
135+
bottom: '-6px',
136+
left: '0',
137+
background: theme.palette.gradients.aaveGradient,
138+
transformOrigin: 'bottom right',
139+
transition: 'transform 0.25s ease-out',
140+
},
141+
})}
142+
>
143+
<Trans>sGHO</Trans>
144+
</Button>
145+
)}
146+
</ListItem>
147+
98148
<ListItem
99149
sx={{
100150
width: { xs: '100%', md: 'unset' },
@@ -120,27 +170,6 @@ export const NavItems = ({ setOpen }: NavItemsProps) => {
120170
)}
121171
</ListItem>
122172

123-
{md && (
124-
<ListItem
125-
sx={{
126-
width: { xs: '100%', md: 'unset' },
127-
mr: { xs: 0, md: 2 },
128-
}}
129-
disablePadding
130-
>
131-
<Typography
132-
component={Link}
133-
href={ROUTES.sGHO}
134-
variant="h2"
135-
color="#F1F1F3"
136-
sx={{ width: '100%', p: 4 }}
137-
onClick={() => handleClick('sGHO', true)}
138-
>
139-
<Trans>sGHO</Trans>
140-
</Typography>
141-
</ListItem>
142-
)}
143-
144173
{md && (
145174
<ListItem
146175
sx={{

src/layouts/components/StakingMenu.tsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -143,16 +143,6 @@ export function StakingMenu({ isMobile = false, onClose }: StakingMenuProps) {
143143
<Trans>Safety Module</Trans>
144144
</Typography>
145145
</MenuItem>
146-
<MenuItem
147-
component={Link}
148-
href={ROUTES.sGHO}
149-
onClick={() => handleMenuItemClick('sGHO')}
150-
sx={{ minWidth: '140px' }}
151-
>
152-
<Typography variant="subheader1">
153-
<Trans>Savings GHO</Trans>
154-
</Typography>
155-
</MenuItem>
156146
</Menu>
157147
</>
158148
);

src/locales/en/messages.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1095,6 +1095,7 @@ msgstr "Unstake window"
10951095
msgid "Reload"
10961096
msgstr "Reload"
10971097

1098+
#: src/layouts/components/NavItems.tsx
10981099
#: src/layouts/components/NavItems.tsx
10991100
#: src/modules/reserve-overview/Gho/SavingsGho.tsx
11001101
#: src/modules/reserve-overview/Gho/SavingsGho.tsx
@@ -3502,7 +3503,6 @@ msgstr "Stablecoin"
35023503
msgid "Stable debt supply is not zero"
35033504
msgstr "Stable debt supply is not zero"
35043505

3505-
#: src/layouts/components/StakingMenu.tsx
35063506
#: src/modules/sGho/SGhoHeader.tsx
35073507
msgid "Savings GHO"
35083508
msgstr "Savings GHO"

0 commit comments

Comments
 (0)