Skip to content

Commit a1b0b15

Browse files
committed
fix: hide in footer if commit hash is unknown
1 parent 3e8f86e commit a1b0b15

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/lib/components/layout/Footer.svelte

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,18 @@
22
import { GITHUB_URL_VERT, DISCORD_URL } from "$lib/util/consts";
33
import { m } from "$lib/paraglide/messages";
44
5+
const commitHash =
6+
__COMMIT_HASH__ && __COMMIT_HASH__ !== "unknown"
7+
? __COMMIT_HASH__
8+
: null;
9+
510
const items = $derived([
611
[m["footer.source_code"](), GITHUB_URL_VERT],
712
[m["footer.discord_server"](), DISCORD_URL],
813
[m["footer.privacy_policy"](), "/privacy"],
9-
[__COMMIT_HASH__, `${GITHUB_URL_VERT}/commit/${__COMMIT_HASH__}`]
14+
...(commitHash
15+
? [[commitHash, `${GITHUB_URL_VERT}/commit/${commitHash}`]]
16+
: []),
1017
]);
1118
1219
const year = new Date().getFullYear();

0 commit comments

Comments
 (0)