add rtlLocales array
This commit is contained in:
@@ -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 />}
|
||||
|
||||
Reference in New Issue
Block a user