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

Verified / Top Projects - Open Points #411

Closed
wants to merge 2 commits into from
Closed
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
125 changes: 49 additions & 76 deletions src/Donations/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { useRouter } from "next/router";
import BackButton from "public/assets/icons/BackButton";
import { FetchedProjectDetails } from "src/Common/Types";
import VerifiedIcon from "@mui/icons-material/Verified";
import { Popover, Typography } from "@mui/material";
import { Box, Popover, Typography } from "@mui/material";

function Donations(): ReactElement {
const router = useRouter();
Expand Down Expand Up @@ -274,9 +274,9 @@ function DonationInfo() {

{donationStep && donationStep > 0 ? (
<>
{projectDetails.purpose === "trees" ||
projectDetails.purpose === "conservation" ? (
<div className="project-title-container">
<div className="project-title-container">
{projectDetails.purpose === "trees" ||
projectDetails.purpose === "conservation" ? (
<a
rel="noreferrer"
target="_blank"
Expand All @@ -288,78 +288,51 @@ function DonationInfo() {
>
{projectDetails.name}
</a>
{projectDetails?.isApproved && (
<div style={{ marginLeft: "10px", marginTop: "auto" }}>
<Typography
aria-owns={open ? "mouse-over-popover" : undefined}
aria-haspopup="true"
onMouseEnter={handlePopoverOpen}
onMouseLeave={handlePopoverClose}
>
<VerifiedIcon sx={{ color: "#fff" }} />
</Typography>
<Popover
id="mouse-over-popover"
className="verified-icon-popup"
open={open}
anchorEl={anchorElement}
anchorOrigin={{
vertical: "bottom",
horizontal: "left",
}}
transformOrigin={{
vertical: "top",
horizontal: isMobile ? "center" : "left",
}}
onClose={handlePopoverClose}
disableRestoreFocus
marginThreshold={0}
>
<Typography>{t("verifiedIconInfo")}</Typography>
</Popover>
</div>
)}
</div>
) : (
<h1
className="title-text text-white"
style={{ marginTop: "10px" }}
>
{projectDetails.name ? projectDetails.name : ""}
{projectDetails.name && projectDetails?.isApproved && (
<div className="d-inline" style={{ marginLeft: "10px" }}>
<Typography
aria-owns={open ? "mouse-over-popover" : undefined}
aria-haspopup="true"
onMouseEnter={handlePopoverOpen}
onMouseLeave={handlePopoverClose}
>
<VerifiedIcon sx={{ color: "#fff" }} />
</Typography>
<Popover
id="mouse-over-popover"
className="verified-icon-popup"
open={open}
anchorEl={anchorElement}
anchorOrigin={{
vertical: "bottom",
horizontal: "left",
}}
transformOrigin={{
vertical: "top",
horizontal: isMobile ? "center" : "left",
}}
onClose={handlePopoverClose}
disableRestoreFocus
marginThreshold={0}
>
<Typography>{t("verifiedIconInfo")}</Typography>
</Popover>
</div>
)}
</h1>
)}

) : (
<h1
className="title-text text-white"
style={{ marginTop: "10px" }}
>
{projectDetails.name ? projectDetails.name : ""}
</h1>
)}
{projectDetails.name && projectDetails?.isApproved && (
<div className="d-flex" style={{ marginLeft: "10px" }}>
<Typography
aria-owns={open ? "mouse-over-popover" : undefined}
aria-haspopup="true"
onMouseEnter={handlePopoverOpen}
onMouseLeave={handlePopoverClose}
>
<VerifiedIcon sx={{ color: "#fff" }} />
</Typography>
<Popover
id="mouse-over-popover"
className="verified-icon-popup"
open={open}
anchorEl={anchorElement}
anchorOrigin={{
vertical: "bottom",
horizontal: "left",
}}
transformOrigin={{
vertical: "top",
horizontal: isMobile ? "center" : "left",
}}
onClose={handlePopoverClose}
disableRestoreFocus
marginThreshold={0}
PaperProps={{
style: {
maxWidth: isMobile ? "600px" : "20%",
},
}}
>
<Typography>{t("verifiedIconInfo")}</Typography>
</Popover>
</div>
)}
</div>
{projectDetails.purpose === "funds" ||
projectDetails.purpose === "bouquet" ? (
<p className="text-white mt-10">
Expand Down
2 changes: 1 addition & 1 deletion styles/donations.scss
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@

.project-title-container {
display: flex;
align-items: flex-end;
}

.donations-transaction-details {
Expand Down Expand Up @@ -1069,7 +1070,6 @@
}

.verified-icon-popup {
max-width: 800px;
padding: 0.5rem;
margin-right: 20px;
pointer-events: none,
Expand Down