feat: add git commit hash to footer for version tracking
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
"build": "next build",
|
"build": "NEXT_PUBLIC_GIT_COMMIT=$(git rev-parse --short HEAD) next build",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "eslint",
|
"lint": "eslint",
|
||||||
"test": "vitest",
|
"test": "vitest",
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import type { Metadata } from "next";
|
import type { Metadata } from "next";
|
||||||
import "./globals.css";
|
import "./globals.css";
|
||||||
import { SessionProvider } from "@/components/SessionProvider";
|
import { SessionProvider } from "@/components/SessionProvider";
|
||||||
|
import Footer from "@/components/Footer";
|
||||||
|
|
||||||
const inter = {
|
const inter = {
|
||||||
variable: "--font-inter",
|
variable: "--font-inter",
|
||||||
@@ -24,6 +25,7 @@ export default function RootLayout({
|
|||||||
<body className="min-h-full flex flex-col">
|
<body className="min-h-full flex flex-col">
|
||||||
<SessionProvider>
|
<SessionProvider>
|
||||||
{children}
|
{children}
|
||||||
|
<Footer />
|
||||||
</SessionProvider>
|
</SessionProvider>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
export default function Footer() {
|
||||||
|
const gitCommit = process.env.NEXT_PUBLIC_GIT_COMMIT || 'unknown';
|
||||||
|
|
||||||
|
return (
|
||||||
|
<footer className="bg-white border-t border-gray-200 mt-auto">
|
||||||
|
<div className="max-w-7xl mx-auto py-4 px-4 sm:px-6 lg:px-8">
|
||||||
|
<div className="flex justify-between items-center text-sm text-gray-500">
|
||||||
|
<p>© {new Date().getFullYear()} EuchreCamp. All rights reserved.</p>
|
||||||
|
<div className="flex items-center space-x-4">
|
||||||
|
<span>Commit: {gitCommit}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user