Skip to content

Commit

Permalink
fix: add watch to mobile menu
Browse files Browse the repository at this point in the history
  • Loading branch information
grothem committed Jan 2, 2025
1 parent 8ae4b39 commit 2a00606
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/layouts/MobileMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
Typography,
} from '@mui/material';
import React, { ReactNode, useEffect, useState } from 'react';
import { useModalContext } from 'src/hooks/useModal';
import { PROD_ENV } from 'src/utils/marketsAndNetworksConfig';

import { Link } from '../components/primitives/Link';
Expand Down Expand Up @@ -47,9 +48,15 @@ const MenuItemsWrapper = ({ children, title }: { children: ReactNode; title: Rea
export const MobileMenu = ({ open, setOpen, headerHeight }: MobileMenuProps) => {
const { i18n } = useLingui();
const [isLanguagesListOpen, setIsLanguagesListOpen] = useState(false);
const { openReadMode } = useModalContext();

useEffect(() => setIsLanguagesListOpen(false), [open]);

const handleOpenReadMode = () => {
setOpen(false);
openReadMode();
};

return (
<>
{open ? (
Expand Down Expand Up @@ -82,6 +89,11 @@ export const MobileMenu = ({ open, setOpen, headerHeight }: MobileMenuProps) =>
</MenuItemsWrapper>
<MenuItemsWrapper title={<Trans>Links</Trans>}>
<List>
<ListItem sx={{ cursor: 'pointer' }} onClick={handleOpenReadMode}>
<ListItemText>
<Trans>Watch wallet</Trans>
</ListItemText>
</ListItem>
<ListItem
sx={{ color: '#F1F1F3' }}
component={Link}
Expand Down

0 comments on commit 2a00606

Please sign in to comment.