1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2024-11-05 13:01:30 +01:00
.profile/components/Footer.tsx

41 lines
1.1 KiB
TypeScript
Raw Normal View History

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(() => {
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-07-27 13:36:35 +02:00
<footer className='bg-white flex flex-col items-center justify-center py-6 text-lg border-t-2 border-gray-600 dark:border-gray-400 dark:bg-black'>
<p>
2021-07-27 13:36:35 +02:00
<Link href='/'>
<a className='hover:underline text-yellow dark:text-yellow-dark'>
Divlo
</a>
</Link>{' '}
| {t('common:all-rights-reserved')}
2021-07-27 13:36:35 +02:00
</p>
<p className='mt-1'>
Version{' '}
<a
className='hover:underline text-yellow dark:text-yellow-dark'
href={versionLink}
target='_blank'
rel='noopener noreferrer'
>
{version}
</a>
</p>
</footer>
2021-04-18 01:56:23 +02:00
)
}