diff --git a/components/common/Modal.js b/components/common/Modal.js index c2bca43f..42df57e2 100644 --- a/components/common/Modal.js +++ b/components/common/Modal.js @@ -1,16 +1,18 @@ import React from 'react'; +import ReactDOM from 'react-dom'; import { useSpring, animated } from 'react-spring'; import styles from './Modal.module.css'; export default function Modal({ title, children }) { const props = useSpring({ opacity: 1, from: { opacity: 0 } }); - return ( + return ReactDOM.createPortal(
{title &&
{title}
}
{children}
-
+ , + document.getElementById('__modals'), ); } diff --git a/components/layout/Layout.js b/components/layout/Layout.js index 1285f2c3..021745cc 100644 --- a/components/layout/Layout.js +++ b/components/layout/Layout.js @@ -16,6 +16,7 @@ export default function Layout({ title, children, header = true, footer = true } {header &&
}
{children}
+
{footer &&