From a48751b9a8a7e1d37f300107ed668fb83ba57e74 Mon Sep 17 00:00:00 2001 From: enes Date: Thu, 29 Aug 2024 16:43:09 +0200 Subject: [PATCH] refactor(footer): make footer a portal and use as needed --- src/components/Footer/Footer.tsx | 205 ++++++++++--------- src/layouts/Main.tsx | 2 - src/pages/home/index.tsx | 2 + src/pages/landing/index.tsx | 2 + src/pages/profile/index.tsx | 2 + src/pages/settings/Settings.tsx | 102 ++++----- src/pages/settings/cache/index.tsx | 86 ++++---- src/pages/settings/profile/index.tsx | 2 + src/pages/settings/relays/index.tsx | 296 ++++++++++++++------------- src/pages/verify/index.tsx | 2 + 10 files changed, 362 insertions(+), 339 deletions(-) diff --git a/src/components/Footer/Footer.tsx b/src/components/Footer/Footer.tsx index eac4166..17140e4 100644 --- a/src/components/Footer/Footer.tsx +++ b/src/components/Footer/Footer.tsx @@ -4,125 +4,128 @@ import styles from './style.module.scss' import { Container } from '../Container' import nostrImage from '../../assets/images/nostr.gif' import { appPublicRoutes } from '../../routes' +import { createPortal } from 'react-dom' -export const Footer = () => ( - , + document.getElementById('root')! + ) diff --git a/src/layouts/Main.tsx b/src/layouts/Main.tsx index ac233cc..f3962eb 100644 --- a/src/layouts/Main.tsx +++ b/src/layouts/Main.tsx @@ -26,7 +26,6 @@ import { } from '../utils' import { useAppSelector } from '../hooks' import styles from './style.module.scss' -import { Footer } from '../components/Footer/Footer' export const MainLayout = () => { const dispatch: Dispatch = useDispatch() @@ -160,7 +159,6 @@ export const MainLayout = () => { > -