Skip to content

Commit

Permalink
chore: move displaycommithash to its own file
Browse files Browse the repository at this point in the history
  • Loading branch information
jordan-ae committed Jul 8, 2024
1 parent 5b426f3 commit 4b93ef9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
9 changes: 1 addition & 8 deletions static/scripts/rewards/init.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { app } from "./app-state";
import { displayCommitHash } from "./render-transaction/display-commit-hash";
import { readClaimDataFromUrl } from "./render-transaction/read-claim-data-from-url";
import { grid } from "./the-grid";

Expand All @@ -9,14 +10,6 @@ readClaimDataFromUrl(app).catch(console.error); // @DEV: read claim data from UR
const footer = document.querySelector(".footer") as Element;
footer.classList.add("animate");

declare const commitHash: string; // @DEV: passed in at build time check build/esbuild-build.ts
function displayCommitHash() {
// display commit hash in footer
const buildElement = document.querySelector(`#build a`) as HTMLAnchorElement;
buildElement.innerHTML = commitHash;
buildElement.href = `https://github.com/ubiquity/pay.ubq.fi/commit/${commitHash}`;
}

// cSpell:ignore llback
function gridLoadedCallback() {
document.body.classList.add("grid-loaded");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
declare const commitHash: string; // @DEV: passed in at build time check build/esbuild-build.ts
export function displayCommitHash() {
// display commit hash in footer
const buildElement = document.querySelector(`#build a`) as HTMLAnchorElement;
buildElement.innerHTML = commitHash;
buildElement.href = `https://github.com/ubiquity/pay.ubq.fi/commit/${commitHash}`;
}

0 comments on commit 4b93ef9

Please sign in to comment.