Skip to content

Commit

Permalink
Merge pull request #544 from PotLock/bug/header-buttons
Browse files Browse the repository at this point in the history
fix header btns for admins
  • Loading branch information
lachlanglen authored Apr 23, 2024
2 parents a0921f3 + a64dd9b commit 4b7d2a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion apps/potlock/widget/Pots/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,13 @@ const applicationExists = existingApplication || applicationSuccess;

const now = Date.now();
const publicRoundOpen = now >= public_round_start_ms && now < public_round_end_ms;
const publicRoundEnded = now > public_round_end_ms;

const applicationOpen = now >= application_start_ms && now < application_end_ms;

const canApply = applicationOpen && !applicationExists && !userIsChefOrGreater;

const canPayoutsBeSet = userIsChefOrGreater && !cooldown_end_ms && !all_paid_out;
const canPayoutsBeSet = userIsChefOrGreater && !all_paid_out && publicRoundEnded;

const canPayoutsBeProcessed = userIsAdminOrGreater && now >= cooldown_end_ms && !all_paid_out;

Expand Down Expand Up @@ -155,6 +156,7 @@ const Fund = styled.div`
`;
const ButtonsWrapper = styled.div`
display: flex;
flex-wrap: wrap;
gap: 2rem;
a,
button {
Expand Down
2 changes: 1 addition & 1 deletion apps/potlock/widget/Project/ListPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ const [projects, approvedProjects] = useMemo(() => {
return [allRegistrations, approvedProjects];
}, allRegistrations);

const featuredProjectIds = ["magicbuild.near", "potlock.near", "yearofchef.near"];
const featuredProjectIds = ["v1.foodbank.near", "potlock.near", "yearofchef.near"];
const featuredProjects = useMemo(
() => projects.filter((project) => featuredProjectIds.includes(project.registrant_id)),
projects
Expand Down

0 comments on commit 4b7d2a1

Please sign in to comment.