From 3a68509b53fa64ae5dacb8bcc9cad6ea9626eeae Mon Sep 17 00:00:00 2001 From: Michal Zielenkiewicz Date: Thu, 30 May 2024 12:58:25 +0200 Subject: [PATCH 1/9] Move mobile footer to profile dropdown --- .changelog/1961.trivial.md | 1 + src/app/components/Footer/index.tsx | 21 +++++++++++++++++-- .../MobileFooterNavigation/index.tsx | 11 +--------- .../Toolbar/Features/Settings/index.tsx | 14 ++++++++++--- src/app/index.tsx | 4 ++-- 5 files changed, 34 insertions(+), 17 deletions(-) create mode 100644 .changelog/1961.trivial.md diff --git a/.changelog/1961.trivial.md b/.changelog/1961.trivial.md new file mode 100644 index 0000000000..0e37229a6e --- /dev/null +++ b/.changelog/1961.trivial.md @@ -0,0 +1 @@ +Move mobile footer to profile dropdown diff --git a/src/app/components/Footer/index.tsx b/src/app/components/Footer/index.tsx index ece2f11bde..4bed59b4e4 100644 --- a/src/app/components/Footer/index.tsx +++ b/src/app/components/Footer/index.tsx @@ -2,7 +2,7 @@ import { Anchor } from 'grommet/es6/components/Anchor' import { Box } from 'grommet/es6/components/Box' import { Text } from 'grommet/es6/components/Text' import { ResponsiveContext } from 'grommet/es6/contexts/ResponsiveContext' -import React, { memo, useState } from 'react' +import React, { memo, useContext, useState } from 'react' import { useSelector } from 'react-redux' import { Trans, useTranslation } from 'react-i18next' import { selectHasAccounts } from 'app/state/wallet/selectors' @@ -147,7 +147,24 @@ export const Footer = memo(() => { defaults="We’d love your feedback at wallet@oasisprotocol.org" /> - ) }) + +export const PageFooter = () => { + const isMobile = useContext(ResponsiveContext) === 'small' + const walletHasAccounts = useSelector(selectHasAccounts) + + return ( + <> + {walletHasAccounts && isMobile ? ( + // Footer for opened wallet is rendered in Settings tab in Profile dropdown + + + + ) : ( +