2021-07-27 13:36:35 +02:00
|
|
|
import { useMemo } from 'react'
|
|
|
|
import Link from 'next/link'
|
2021-04-18 01:56:23 +02:00
|
|
|
import useTranslation from 'next-translate/useTranslation'
|
|
|
|
|
2021-07-27 13:36:35 +02:00
|
|
|
export interface FooterProps {
|
|
|
|
version: string
|
|
|
|
}
|
|
|
|
|
|
|
|
export const Footer: React.FC<FooterProps> = (props) => {
|
2021-04-18 01:56:23 +02:00
|
|
|
const { t } = useTranslation()
|
2021-07-27 13:36:35 +02:00
|
|
|
const { version } = props
|
|
|
|
|
|
|
|
const versionLink = useMemo(() => {
|
2021-07-27 21:01:33 +02:00
|
|
|
return `https://github.com/Divlo/Divlo/releases/tag/v${version}`
|
2021-07-27 13:36:35 +02:00
|
|
|
}, [version])
|
2021-04-18 01:56:23 +02:00
|
|
|
|
|
|
|
return (
|
2021-12-04 15:52:51 +01:00
|
|
|
<footer className='flex flex-col items-center justify-center border-t-2 border-gray-600 bg-white py-6 text-lg dark:border-gray-400 dark:bg-black'>
|
2021-05-08 19:52:04 +02:00
|
|
|
<p>
|
2021-07-27 13:36:35 +02:00
|
|
|
<Link href='/'>
|
2021-12-04 15:52:51 +01:00
|
|
|
<a className='text-yellow hover:underline dark:text-yellow-dark'>
|
2021-07-27 13:36:35 +02:00
|
|
|
Divlo
|
|
|
|
</a>
|
|
|
|
</Link>{' '}
|
2021-11-06 17:52:04 +01:00
|
|
|
| {t('common:all-rights-reserved')}
|
2021-07-27 13:36:35 +02:00
|
|
|
</p>
|
|
|
|
<p className='mt-1'>
|
|
|
|
Version{' '}
|
|
|
|
<a
|
2021-12-04 15:52:51 +01:00
|
|
|
className='text-yellow hover:underline dark:text-yellow-dark'
|
2021-07-27 13:36:35 +02:00
|
|
|
href={versionLink}
|
|
|
|
target='_blank'
|
|
|
|
rel='noopener noreferrer'
|
|
|
|
>
|
|
|
|
{version}
|
|
|
|
</a>
|
2021-05-08 19:52:04 +02:00
|
|
|
</p>
|
|
|
|
</footer>
|
2021-04-18 01:56:23 +02:00
|
|
|
)
|
|
|
|
}
|