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" process.env["NODE_ENV"] === "development"
? "0.0.0-development" ? "0.0.0-development"
: packageJSON.version : packageJSON.version
export const GIT_REPO_URL =
"https://git.theoludwig.fr/theoludwig/wikipedia-game-solver"

View File

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

View File

@ -1,5 +1,6 @@
import { useTranslations } from "next-intl" import { useTranslations } from "next-intl"
import { GIT_REPO_URL } from "@repo/constants"
import { Link } from "../design/Link/Link" import { Link } from "../design/Link/Link"
export interface FooterProps { export interface FooterProps {
@ -22,9 +23,13 @@ export const Footer: React.FC<FooterProps> = (props) => {
<p> <p>
Version{" "} 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} {version}
</strong> </Link>
</p> </p>
</footer> </footer>
) )

3
pnpm-lock.yaml generated
View File

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