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/__tests__/__snapshots__/index.test.tsx.snap b/src/app/__tests__/__snapshots__/index.test.tsx.snap index 58d0c26986..bbca81b5aa 100644 --- a/src/app/__tests__/__snapshots__/index.test.tsx.snap +++ b/src/app/__tests__/__snapshots__/index.test.tsx.snap @@ -46,7 +46,7 @@ exports[` should render and match the snapshot 1`] = `
- +
diff --git a/src/app/components/Footer/PageFooter.tsx b/src/app/components/Footer/PageFooter.tsx new file mode 100644 index 0000000000..122116e34e --- /dev/null +++ b/src/app/components/Footer/PageFooter.tsx @@ -0,0 +1,25 @@ +import { useContext } from 'react' +import { useSelector } from 'react-redux' +import { Box } from 'grommet/es6/components/Box' +import { ResponsiveContext } from 'grommet/es6/contexts/ResponsiveContext' +import { selectHasAccounts } from 'app/state/wallet/selectors' +import { MobileFooterNavigation } from '../MobileFooterNavigation' +import { Footer } from '.' + +export const PageFooter = () => { + const isMobile = useContext(ResponsiveContext) === 'small' + const isDesktop = useContext(ResponsiveContext) === 'large' + const walletHasAccounts = useSelector(selectHasAccounts) + + return ( + <> + {walletHasAccounts && isMobile && ( + + + + )} + {/* Footer for opened wallet is rendered in Settings tab in Profile dropdown */} + {((walletHasAccounts && isDesktop) || !walletHasAccounts) &&