1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2024-11-09 22:09:07 +01:00
.profile/components/Footer.tsx

43 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/theoludwig/theoludwig/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>
2022-10-27 19:13:29 +02:00
<Link
href='/'
className='text-yellow hover:underline dark:text-yellow-dark'
>
Théo LUDWIG
2021-07-27 13:36:35 +02:00
</Link>{' '}
| {t('common:all-rights-reserved')}
2021-07-27 13:36:35 +02:00
</p>
<p className='mt-1'>
Version{' '}
<a
data-cy='version-link'
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
)
}