Fixed placement of modals.

This commit is contained in:
Mike Cao 2021-05-25 18:51:50 -07:00
parent b2d04c00ac
commit fdadaddab7

View File

@ -7,6 +7,7 @@ import { rtlLocales } from 'lib/lang';
export default function Layout({ title, children, header = true, footer = true }) { export default function Layout({ title, children, header = true, footer = true }) {
const [locale] = useLocale(); const [locale] = useLocale();
const dir = rtlLocales.includes(locale) ? 'rtl' : 'ltr';
return ( return (
<> <>
@ -15,11 +16,11 @@ export default function Layout({ title, children, header = true, footer = true }
</Head> </Head>
{header && <Header />} {header && <Header />}
<main className="container" dir={rtlLocales.includes(locale) ? 'rtl' : 'ltr'}> <main className="container" dir={dir}>
{children} {children}
</main> </main>
{footer && <Footer />} {footer && <Footer />}
<div id="__modals" /> <div id="__modals" dir={dir} />
</> </>
); );
} }