From d5537c466e5228d9823d8f107061143b6344cf23 Mon Sep 17 00:00:00 2001
From: Dorian Koch <doriank@fsmpi.rwth-aachen.de>
Date: Thu, 4 Jul 2024 19:12:58 +0200
Subject: [PATCH] Shorten git commit hashes, Closes #45

---
 src/components/DefaultLayout.tsx | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/components/DefaultLayout.tsx b/src/components/DefaultLayout.tsx
index e25d887..4c6f56a 100644
--- a/src/components/DefaultLayout.tsx
+++ b/src/components/DefaultLayout.tsx
@@ -621,17 +621,20 @@ function Footer({ status }: { status?: GetStatusResponse }) {
                                     "https://git.fsmpi.rwth-aachen.de/videoag/frontend/-/tree/" +
                                     (process.env.NEXT_PUBLIC_GIT_COMMIT_HASH ?? "live_production")
                                 }
+                                title={process.env.NEXT_PUBLIC_GIT_COMMIT_HASH ?? "unknown"}
                             >
-                                {process.env.NEXT_PUBLIC_GIT_COMMIT_HASH ?? "unknown"}
+                                {process.env.NEXT_PUBLIC_GIT_COMMIT_HASH?.substring(0, 8) ??
+                                    "unknown"}
                             </a>
                             ; Back:{" "}
                             <a
                                 href={
                                     "https://git.fsmpi.rwth-aachen.de/videoag/backend_api/-/tree/" +
-                                    (status?.git_commit_hash ?? "live_production")
+                                    (status?.git_commit_hash ?? "main")
                                 }
+                                title={status?.git_commit_hash ?? "unknown"}
                             >
-                                {status?.git_commit_hash ?? "unknown"}
+                                {status?.git_commit_hash?.substring(0, 8) ?? "unknown"}
                             </a>
                             , {status?.status ?? "unknown"}
                         </div>
-- 
GitLab