forked from administration/panel
30 lines
943 B
TypeScript
30 lines
943 B
TypeScript
import { execSync } from "child_process";
|
|
|
|
export default function Sparkle() {
|
|
const hash = execSync("git rev-parse HEAD", { cwd: process.cwd() }).toString().trim();
|
|
const branch = execSync("git rev-parse --abbrev-ref HEAD", { cwd: process.cwd() }).toString().trim();
|
|
|
|
return (
|
|
<div>
|
|
<h1 className="text-xl text-center">
|
|
<span>Running version </span>
|
|
<code>
|
|
<a href={`https://git.revolt.chat/administration/panel/commit/${hash}`} target="_blank">
|
|
{hash.substring(0, 10)}
|
|
</a>
|
|
</code>
|
|
<span> on branch </span>
|
|
<code>
|
|
<a href={`https://git.revolt.chat/administration/panel/src/branch/${branch}`} target="_blank">
|
|
{branch}
|
|
</a>
|
|
</code>
|
|
</h1>
|
|
<img
|
|
className="absolute right-0 bottom-0"
|
|
src="https://api.gifbox.me/file/posts/MF3oORlDjfHAVJ-DgPyRQSjMdy9WNIxk.webp"
|
|
/>
|
|
</div>
|
|
);
|
|
}
|