Skip to content

Commit

Permalink
chore: change loadedProjectInfo name to loadProjectInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
0xExp-po committed Sep 10, 2024
1 parent ff704dd commit deb7f0e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions dapp/src/components/Commit.astro
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ import Loading from "./utils/Loading.astro";

<script>
import { commitHash } from "../service/ProjectService";
import { loadedProjectInfo } from "../service/StateService";
import { loadProjectInfo } from "../service/StateService";
import { loadedPublicKey } from "./stellar-wallets-kit";

document.addEventListener("astro:page-load", () => {
const projectInfo = loadedProjectInfo();
const projectInfo = loadProjectInfo();

if (projectInfo) {
const connectedPublicKey = loadedPublicKey();
Expand Down
8 changes: 4 additions & 4 deletions dapp/src/components/ProjectInfo.astro
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,15 @@ import CommitHistory from "./CommitHistory.jsx";

<script>
import { getProject, getProjectHash, updateConfig } from "../service/ProjectService";
import { initializeProjectState, loadedProjectInfo, setProject, setProjectLatestSha } from "../service/StateService";
import { initializeProjectState, loadProjectInfo, setProject, setProjectLatestSha } from "../service/StateService";
import { loadedPublicKey } from "./stellar-wallets-kit";

document.addEventListener("astro:page-load", () => {
initializeProjectState();
const modal = document.getElementById("update-config-modal") as HTMLDialogElement;

function updateProjectInfo() {
const projectInfo = loadedProjectInfo();
async function updateProjectInfo() {
const projectInfo = loadProjectInfo();
if (projectInfo) {
const projectNameElement = document.getElementById("project-name-value");
if (projectNameElement) {
Expand Down Expand Up @@ -288,7 +288,7 @@ import CommitHistory from "./CommitHistory.jsx";
}

window.addEventListener('walletConnected', (_event: Event) => {
const projectInfo = loadedProjectInfo();
const projectInfo = loadProjectInfo();

if (projectInfo) {
const connectedPublicKey = loadedPublicKey();
Expand Down
4 changes: 2 additions & 2 deletions dapp/src/service/StateService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function loadProjectName(): string | undefined {
return projectState.project_name;
}

function loadedProjectInfo(): Project | undefined {
function loadProjectInfo(): Project | undefined {
if (!projectInfo.project_maintainers || !projectInfo.project_config_url || !projectInfo.project_config_hash || !projectState.project_name) {
return undefined;
}
Expand Down Expand Up @@ -156,7 +156,7 @@ export {
setProject,
setProjectRepoInfo,
loadedProjectId,
loadedProjectInfo,
loadProjectInfo,
loadProjectRepoInfo,
setProjectLatestSha,
loadProjectLatestSha,
Expand Down

0 comments on commit deb7f0e

Please sign in to comment.