Skip to content

Commit

Permalink
only display approved projects
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlanglen committed Nov 3, 2023
1 parent bfbbb41 commit f97a75f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions apps/potlock/widget/Project/ListPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,12 @@ const CATEGORY_MAPPINGS = {
education: "Education",
};

const HIDDEN_PROJECT_IDS = ["roshaan.near"];
// const HIDDEN_PROJECT_IDS = ["roshaan.near"];

if (!state.registeredProjects) {
Near.asyncView(registryId, "get_projects", {})
.then((projects) => {
projects = projects.filter((project) => project.status === "Approved");
// get social data for each project
// name
// description
Expand Down Expand Up @@ -136,9 +137,7 @@ if (!state.registeredProjects) {
return formatted;
});
State.update({
registeredProjects: formattedProjects.filter(
(project) => !HIDDEN_PROJECT_IDS.includes(project.id)
),
registeredProjects: formattedProjects,
});
});
})
Expand Down
7 changes: 3 additions & 4 deletions build/potlock/src/Project/ListPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,12 @@ const CATEGORY_MAPPINGS = {
education: "Education",
};

const HIDDEN_PROJECT_IDS = ["roshaan.near"];
// const HIDDEN_PROJECT_IDS = ["roshaan.near"];

if (!state.registeredProjects) {
Near.asyncView(registryId, "get_projects", {})
.then((projects) => {
projects = projects.filter((project) => project.status === "Approved");
// get social data for each project
// name
// description
Expand Down Expand Up @@ -136,9 +137,7 @@ if (!state.registeredProjects) {
return formatted;
});
State.update({
registeredProjects: formattedProjects.filter(
(project) => !HIDDEN_PROJECT_IDS.includes(project.id)
),
registeredProjects: formattedProjects,
});
});
})
Expand Down

0 comments on commit f97a75f

Please sign in to comment.