diff --git a/dapp/public/icons/check.svg b/dapp/public/icons/check.svg new file mode 100644 index 0000000..0e82c45 --- /dev/null +++ b/dapp/public/icons/check.svg @@ -0,0 +1,4 @@ + diff --git a/dapp/public/icons/failed.svg b/dapp/public/icons/failed.svg new file mode 100644 index 0000000..d339de3 --- /dev/null +++ b/dapp/public/icons/failed.svg @@ -0,0 +1,4 @@ + diff --git a/dapp/src/components/Commit.astro b/dapp/src/components/Commit.astro index d79405b..2583516 100644 --- a/dapp/src/components/Commit.astro +++ b/dapp/src/components/Commit.astro @@ -47,17 +47,17 @@ import PrimaryButton from "./utils/PrimaryButton.astro"; import { commitHash } from "../service/WriteContractService"; import { loadProjectInfo } from "../service/StateService"; import { loadedPublicKey } from "./stellar-wallets-kit"; - import { latestCommit } from "../utils/store"; + import { latestCommit, projectInfoLoaded } from "../utils/store"; document.addEventListener("astro:page-load", () => { function updateCommitSectionVisibility() { const projectInfo = loadProjectInfo(); - + if (projectInfo) { const connectedPublicKey = loadedPublicKey(); const isMaintainer = connectedPublicKey - ? projectInfo.maintainers.includes(connectedPublicKey) - : false; + ? projectInfo.maintainers.includes(connectedPublicKey) + : false; const updateCommitSection = document.getElementById( "update-commit-section", ); @@ -66,9 +66,13 @@ import PrimaryButton from "./utils/PrimaryButton.astro"; } } } - + // Call the function when the page loads - updateCommitSectionVisibility(); + projectInfoLoaded.subscribe((loaded) => { + if (loaded) { + updateCommitSectionVisibility(); + } + }); const commit_hash = document.getElementById( "commit_hash", diff --git a/dapp/src/components/CommitRecord.jsx b/dapp/src/components/CommitRecord.jsx index 19602c9..e17652a 100644 --- a/dapp/src/components/CommitRecord.jsx +++ b/dapp/src/components/CommitRecord.jsx @@ -40,7 +40,7 @@ const CommitRecord = ({ return (
description
+