diff --git a/static/scripts/rewards/init.ts b/static/scripts/rewards/init.ts index c43fcee8..4fca4b88 100644 --- a/static/scripts/rewards/init.ts +++ b/static/scripts/rewards/init.ts @@ -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"; @@ -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"); diff --git a/static/scripts/rewards/render-transaction/display-commit-hash.ts b/static/scripts/rewards/render-transaction/display-commit-hash.ts new file mode 100644 index 00000000..b145f3a0 --- /dev/null +++ b/static/scripts/rewards/render-transaction/display-commit-hash.ts @@ -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}`; +}