add commit hash to footer

* closes #5
This commit is contained in:
Matthias Kretschmann 2024-04-06 14:35:49 +01:00
parent 7fb3c95822
commit 979e2361fb
Signed by: m
GPG Key ID: 606EEEF3C479A91F
3 changed files with 12 additions and 10 deletions

View File

@ -14,7 +14,7 @@
justify-content: space-between;
}
.footer a {
.footer a:not(.commitHash) {
color: rgba(var(--foreground-rgb), 0.8);
}

View File

@ -12,18 +12,20 @@ export function Footer() {
</span>
<p className={styles.social}>
<a
className={styles.commitHash}
href={`${repoUrl}/commit/${process.env.GIT_COMMIT_SHA}`}
>
{process.env.GIT_COMMIT_SHA?.substring(0, 7)}
</a>
<a href={repoUrl}>
<GitHubLogoIcon />
</a>
</p>
</div>
{/* <div>
<p>
<a href={`${repoUrl}/commit/${process.env.VERCEL_GIT_COMMIT_SHA}`}>
{process.env.VERCEL_GIT_COMMIT_SHA?.substring(0, 7)}
</a>
</p>
</div> */}
<div style={{ textAlign: 'right' }}>
<p></p>
</div>
</footer>
)
}

View File

@ -3,8 +3,8 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"dev": "export GIT_COMMIT_SHA=$(git rev-parse HEAD) && next dev",
"build": "export GIT_COMMIT_SHA=$(git rev-parse HEAD) && next build",
"start": "next start",
"lint": "next lint",
"typecheck": "tsc --noEmit",