2023-10-23 23:11:59 +02:00
|
|
|
import { useMemo } from "react"
|
2023-07-31 19:06:46 +02:00
|
|
|
|
|
|
|
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 (
|
2023-10-23 23:11:59 +02:00
|
|
|
<p className="mt-1">
|
|
|
|
Version{" "}
|
2023-07-31 19:06:46 +02:00
|
|
|
<a
|
2023-10-23 23:11:59 +02:00
|
|
|
data-cy="version-link"
|
2024-01-28 03:21:11 +01:00
|
|
|
className="font-semibold text-yellow hover:underline dark:text-yellow-dark"
|
2023-07-31 19:06:46 +02:00
|
|
|
href={versionLink}
|
2023-10-23 23:11:59 +02:00
|
|
|
target="_blank"
|
|
|
|
rel="noopener noreferrer"
|
2023-07-31 19:06:46 +02:00
|
|
|
>
|
|
|
|
{version}
|
|
|
|
</a>
|
|
|
|
</p>
|
|
|
|
)
|
|
|
|
}
|