Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix active round in donation modal #518

Merged
merged 1 commit into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading