mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
add rtl support
This commit is contained in:
parent
0126154e39
commit
0c13f8d358
6 changed files with 28 additions and 7 deletions
|
|
@ -2,15 +2,24 @@ import React from 'react';
|
|||
import Head from 'next/head';
|
||||
import Header from 'components/layout/Header';
|
||||
import Footer from 'components/layout/Footer';
|
||||
import { useIntl } from 'react-intl';
|
||||
|
||||
export default function Layout({ title, children, header = true, footer = true }) {
|
||||
const intl = useIntl();
|
||||
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<Head dir={intl.formatMessage({ id: 'metrics.dir', defaultMessage: 'ltr' })}>
|
||||
<title>umami{title && ` - ${title}`}</title>
|
||||
</Head>
|
||||
|
||||
{header && <Header />}
|
||||
<main className="container">{children}</main>
|
||||
<main
|
||||
className="container"
|
||||
dir={intl.formatMessage({ id: 'metrics.dir', defaultMessage: 'ltr' })}
|
||||
>
|
||||
{children}
|
||||
</main>
|
||||
{footer && <Footer />}
|
||||
<div id="__modals" />
|
||||
</>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue