mirror of
https://github.com/YuzuZensai/Pien-Studio.git
synced 2026-09-02 14:18:35 +00:00
✨ feat: ui commit hash versioning
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user