feat: ui commit hash versioning

This commit is contained in:
2026-05-16 11:53:50 +07:00
parent ff6afe5391
commit 80744f40ba
3 changed files with 32 additions and 1 deletions
+20
View File
@@ -0,0 +1,20 @@
"use client";
import { useEffect, useState } from "react";
export function Footer() {
const [hash, setHash] = useState<string>("...");
useEffect(() => {
fetch("/api/commit-hash")
.then((res) => res.json())
.then((data) => setHash(data.hash))
.catch(() => setHash("unknown"));
}, []);
return (
<footer className="fixed bottom-2 right-4 py-1 pointer-events-none">
<span className="text-xs text-gray-400 font-mono">{hash}</span>
</footer>
);
}