Skip to content

Commit

Permalink
fix: add watch to mobile menu [skip cypress] (#2300)
Browse files Browse the repository at this point in the history
  • Loading branch information
grothem authored Jan 3, 2025
1 parent 8ae4b39 commit 13c5c91
Show file tree
Hide file tree
Showing 2 changed files with 13 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', color: '#F1F1F3' }} onClick={handleOpenReadMode}>
<ListItemText>
<Trans>Watch wallet</Trans>
</ListItemText>
</ListItem>
<ListItem
sx={{ color: '#F1F1F3' }}
component={Link}
Expand Down
1 change: 1 addition & 0 deletions src/locales/en/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,7 @@ msgstr "Please connect your wallet to see migration tool."
msgid "{networkName} Faucet"
msgstr "{networkName} Faucet"

#: src/layouts/MobileMenu.tsx
#: src/layouts/SettingsMenu.tsx
msgid "Watch wallet"
msgstr "Watch wallet"
Expand Down

0 comments on commit 13c5c91

Please sign in to comment.