From 6c717e576852a6aa82e68769046d0535bfd21aa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20LUDWIG?= Date: Wed, 24 Jul 2024 22:04:33 +0200 Subject: [PATCH] feat(ui): link version on footer --- packages/constants/version.ts | 3 +++ packages/ui/package.json | 1 + packages/ui/src/Footer/Footer.tsx | 9 +++++++-- pnpm-lock.yaml | 3 +++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/constants/version.ts b/packages/constants/version.ts index 8c20e39..70923bc 100644 --- a/packages/constants/version.ts +++ b/packages/constants/version.ts @@ -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" diff --git a/packages/ui/package.json b/packages/ui/package.json index 63f25f8..170cacf 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -19,6 +19,7 @@ }, "dependencies": { "@repo/config-tailwind": "workspace:*", + "@repo/constants": "workspace:*", "@repo/i18n": "workspace:*", "@repo/react-hooks": "workspace:*", "cva": "catalog:", diff --git a/packages/ui/src/Footer/Footer.tsx b/packages/ui/src/Footer/Footer.tsx index 90e35e6..a4f78f5 100644 --- a/packages/ui/src/Footer/Footer.tsx +++ b/packages/ui/src/Footer/Footer.tsx @@ -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 = (props) => {

Version{" "} - + {version} - +

) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4488dc8..63a1023 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -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