2020-08-07 11:27:12 +02:00
|
|
|
import React from 'react';
|
2020-10-03 19:53:06 +02:00
|
|
|
import classNames from 'classnames';
|
2021-05-15 10:29:39 +02:00
|
|
|
import { FormattedMessage } from 'react-intl';
|
2020-09-16 05:34:30 +02:00
|
|
|
import Link from 'components/common/Link';
|
2020-08-07 11:27:12 +02:00
|
|
|
import styles from './Footer.module.css';
|
2020-10-02 19:25:31 +02:00
|
|
|
import useVersion from 'hooks/useVersion';
|
2021-05-15 10:29:39 +02:00
|
|
|
import useLocale from 'hooks/useLocale';
|
2021-05-16 08:27:48 +02:00
|
|
|
import { rtlLocales } from 'lib/lang';
|
2020-08-07 11:27:12 +02:00
|
|
|
|
|
|
|
export default function Footer() {
|
2020-10-02 19:25:31 +02:00
|
|
|
const { current } = useVersion();
|
2021-06-30 03:41:34 +02:00
|
|
|
const { locale } = useLocale();
|
2021-05-13 08:15:37 +02:00
|
|
|
|
2020-08-07 11:27:12 +02:00
|
|
|
return (
|
2021-05-16 08:27:48 +02:00
|
|
|
<footer className="container" dir={rtlLocales.includes(locale) ? 'rtl' : 'ltr'}>
|
2020-10-03 19:53:06 +02:00
|
|
|
<div className={classNames(styles.footer, 'row')}>
|
|
|
|
<div className="col-12 col-md-4" />
|
|
|
|
<div className="col-12 col-md-4">
|
2020-09-16 04:16:05 +02:00
|
|
|
<FormattedMessage
|
2020-09-17 07:29:40 +02:00
|
|
|
id="message.powered-by"
|
2020-09-16 05:34:30 +02:00
|
|
|
defaultMessage="Powered by {name}"
|
2020-09-16 04:16:05 +02:00
|
|
|
values={{
|
|
|
|
name: (
|
2020-09-16 05:34:30 +02:00
|
|
|
<Link href="https://umami.is">
|
2020-09-16 04:16:05 +02:00
|
|
|
<b>umami</b>
|
2020-09-16 05:34:30 +02:00
|
|
|
</Link>
|
2020-09-16 04:16:05 +02:00
|
|
|
),
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
</div>
|
2020-10-08 10:27:53 +02:00
|
|
|
<div className={classNames(styles.version, 'col-12 col-md-4')}>
|
2020-10-10 11:36:44 +02:00
|
|
|
<Link href={`https://github.com/mikecao/umami/releases`}>{`v${current}`}</Link>
|
2020-10-08 10:27:53 +02:00
|
|
|
</div>
|
2020-08-15 10:17:15 +02:00
|
|
|
</div>
|
2020-08-07 11:27:12 +02:00
|
|
|
</footer>
|
|
|
|
);
|
|
|
|
}
|