mirror of
https://github.com/umami-software/umami.git
synced 2026-02-18 03:25:40 +01:00
add rtlLocales array
This commit is contained in:
parent
703a1e13db
commit
afc4940680
4 changed files with 8 additions and 3 deletions
|
|
@ -3,6 +3,7 @@ import Head from 'next/head';
|
|||
import Header from 'components/layout/Header';
|
||||
import Footer from 'components/layout/Footer';
|
||||
import useLocale from 'hooks/useLocale';
|
||||
import { rtlLocales } from 'lib/lang';
|
||||
|
||||
export default function Layout({ title, children, header = true, footer = true }) {
|
||||
const [locale] = useLocale();
|
||||
|
|
@ -14,7 +15,7 @@ export default function Layout({ title, children, header = true, footer = true }
|
|||
</Head>
|
||||
|
||||
{header && <Header />}
|
||||
<main className="container" dir={locale === 'ar-SA' ? 'rtl' : 'ltr'}>
|
||||
<main className="container" dir={rtlLocales.includes(locale) ? 'rtl' : 'ltr'}>
|
||||
{children}
|
||||
</main>
|
||||
{footer && <Footer />}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue