feat(ui): link version on footer

This commit is contained in:
Théo LUDWIG 2024-07-24 22:04:33 +02:00
parent dfd9055318
commit 6c717e5768
Signed by: theoludwig
GPG Key ID: ADFE5A563D718F3B
4 changed files with 14 additions and 2 deletions

View File

@ -4,3 +4,6 @@ export const VERSION =
process.env["NODE_ENV"] === "development"
? "0.0.0-development"
: packageJSON.version
export const GIT_REPO_URL =
"https://git.theoludwig.fr/theoludwig/wikipedia-game-solver"

View File

@ -19,6 +19,7 @@
},
"dependencies": {
"@repo/config-tailwind": "workspace:*",
"@repo/constants": "workspace:*",
"@repo/i18n": "workspace:*",
"@repo/react-hooks": "workspace:*",
"cva": "catalog:",

View File

@ -1,5 +1,6 @@
import { useTranslations } from "next-intl"
import { GIT_REPO_URL } from "@repo/constants"
import { Link } from "../design/Link/Link"
export interface FooterProps {
@ -22,9 +23,13 @@ export const Footer: React.FC<FooterProps> = (props) => {
<p>
Version{" "}
<strong className="text-primary dark:text-primary-dark hover:underline">
<Link
href={`${GIT_REPO_URL}/releases/tag/v${version}`}
target="_blank"
isExternal={false}
>
{version}
</strong>
</Link>
</p>
</footer>
)

View File

@ -547,6 +547,9 @@ importers:
'@repo/config-tailwind':
specifier: workspace:*
version: link:../config-tailwind
'@repo/constants':
specifier: workspace:*
version: link:../constants
'@repo/i18n':
specifier: workspace:*
version: link:../i18n