Skip to content

Commit

Permalink
Merge pull request #518 from PotLock/bug/pot-donation
Browse files Browse the repository at this point in the history
fix active round in donation modal
  • Loading branch information
lachlanglen authored Apr 8, 2024
2 parents ca3eafc + 8cb1d4f commit 3f7da2e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
4 changes: 1 addition & 3 deletions apps/potlock/widget/ModalDonation/Main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,17 +284,15 @@ const pots = useCache(
}),
"active-pots"
);

useEffect(() => {
if (potId && !activeRounds) {
setActiveRounds([potId]);
State.update({
selectedRound: potId,
donationType: multiple ? "auto" : "pot",
});
} else if (!activeRounds && projectId) {
} else if (!activeRounds?.length && projectId) {
if (!pots) setActiveRounds([]);

(pots ?? []).forEach((pot, idx) => {
if (pot) {
PotSDK.asyncGetApplicationByProjectId(pot, projectId)
Expand Down
18 changes: 15 additions & 3 deletions apps/potlock/widget/Project/ExternalFunding.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const Container = styled.div`
div {
font-weight: 600;
}
@media screen and (max-width: 768px) {
@media screen and (max-width: 920px) {
div {
display: none;
}
Expand All @@ -52,7 +52,7 @@ const Container = styled.div`
div {
text-transform: capitalize;
width: 100%;
max-width: 156px;
max-width: 120px;
text-align: left;
&:last-of-type {
justify-content: right;
Expand Down Expand Up @@ -81,8 +81,15 @@ const Container = styled.div`
opacity: 0;
display: none;
}
@media screen and (max-width: 768px) {
.date {
display: flex;
align-items: center;
}
@media screen and (max-width: 920px) {
gap: 8px;
.date {
order: 2;
}
.description {
flex-basis: 100%;
order: 1;
Expand All @@ -107,6 +114,11 @@ const Container = styled.div`
}
}
}
@media screen and (max-width: 920px) {
.header div:not(:first-of-type) {
display: none;
}
}
}
`;

Expand Down

0 comments on commit 3f7da2e

Please sign in to comment.