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

41 lines
1.1 KiB
TypeScript
Raw Permalink 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-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'>
<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>{' '}
| {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>
</p>
</footer>
2021-04-18 01:56:23 +02:00
)
}