mirror of
https://github.com/theoludwig/theoludwig.git
synced 2024-11-05 04:51:30 +01:00
Théo LUDWIG
6b29ce9b15
Improvements: - Hide switch theme input (ugly little white square) - i18n without subpath (e.g: /fr or /en), same url whatever the locale used
29 lines
625 B
TypeScript
29 lines
625 B
TypeScript
import { useMemo } from 'react'
|
|
|
|
interface FooterVersionProps {
|
|
version: string
|
|
}
|
|
|
|
export const FooterVersion = (props: FooterVersionProps): JSX.Element => {
|
|
const { version } = props
|
|
|
|
const versionLink = useMemo(() => {
|
|
return `https://github.com/theoludwig/theoludwig/releases/tag/v${version}`
|
|
}, [version])
|
|
|
|
return (
|
|
<p className='mt-1'>
|
|
Version{' '}
|
|
<a
|
|
data-cy='version-link'
|
|
className='text-yellow hover:underline dark:text-yellow-dark'
|
|
href={versionLink}
|
|
target='_blank'
|
|
rel='noopener noreferrer'
|
|
>
|
|
{version}
|
|
</a>
|
|
</p>
|
|
)
|
|
}
|