diff --git a/packages/grant-explorer/src/assets/alt1.svg b/packages/grant-explorer/src/assets/alt1.svg index 61fed25106..5aa5c1a0da 100755 --- a/packages/grant-explorer/src/assets/alt1.svg +++ b/packages/grant-explorer/src/assets/alt1.svg @@ -1,34 +1,83 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + - + - + - + - - + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/grant-explorer/src/assets/alt2.svg b/packages/grant-explorer/src/assets/alt2.svg index 08c9966dbc..b37b0e6a8e 100755 --- a/packages/grant-explorer/src/assets/alt2.svg +++ b/packages/grant-explorer/src/assets/alt2.svg @@ -1,34 +1,83 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + - + - + - + - - + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/grant-explorer/src/assets/alt3.svg b/packages/grant-explorer/src/assets/alt3.svg index 249c120abf..b2aa13ca83 100755 --- a/packages/grant-explorer/src/assets/alt3.svg +++ b/packages/grant-explorer/src/assets/alt3.svg @@ -1,34 +1,83 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + - + - + - + - - + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/grant-explorer/src/assets/alt4.svg b/packages/grant-explorer/src/assets/alt4.svg index cab559b412..753a4db781 100755 --- a/packages/grant-explorer/src/assets/alt4.svg +++ b/packages/grant-explorer/src/assets/alt4.svg @@ -1,34 +1,83 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + - + - + - + - - + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/grant-explorer/src/assets/alt5.svg b/packages/grant-explorer/src/assets/alt5.svg index 6381301736..e138e4ab52 100755 --- a/packages/grant-explorer/src/assets/alt5.svg +++ b/packages/grant-explorer/src/assets/alt5.svg @@ -1,34 +1,83 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + - + - + - + - - + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/grant-explorer/src/assets/preview_alt_1.svg b/packages/grant-explorer/src/assets/preview_alt_1.svg index 164b1b7ae2..9004822b33 100755 --- a/packages/grant-explorer/src/assets/preview_alt_1.svg +++ b/packages/grant-explorer/src/assets/preview_alt_1.svg @@ -1,106 +1,154 @@ - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + - + - - + + - - + + - - + + - - + + + + + + + + + + + + + + + + + + + + + - - + + - - - + + + diff --git a/packages/grant-explorer/src/assets/preview_alt_2.svg b/packages/grant-explorer/src/assets/preview_alt_2.svg index 034bcda0a0..a14749f9b7 100755 --- a/packages/grant-explorer/src/assets/preview_alt_2.svg +++ b/packages/grant-explorer/src/assets/preview_alt_2.svg @@ -1,120 +1,154 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + - + - + - + - - + + - - + + - - + + - - + + + + + + + + + + + + + + + + + + + + + - - + + - - - + + + diff --git a/packages/grant-explorer/src/assets/preview_alt_3.svg b/packages/grant-explorer/src/assets/preview_alt_3.svg index 984abade64..0c96741f8e 100755 --- a/packages/grant-explorer/src/assets/preview_alt_3.svg +++ b/packages/grant-explorer/src/assets/preview_alt_3.svg @@ -1,120 +1,154 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + - + - + - + - - + + - - + + - - + + - - + + + + + + + + + + + + + + + + + + + + + - - + + - - - + + + diff --git a/packages/grant-explorer/src/assets/preview_alt_4.svg b/packages/grant-explorer/src/assets/preview_alt_4.svg index 1d991a96ca..1877546e77 100755 --- a/packages/grant-explorer/src/assets/preview_alt_4.svg +++ b/packages/grant-explorer/src/assets/preview_alt_4.svg @@ -1,127 +1,154 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + - + - + - + - - + + - - + + - - + + - - + + + + + + + + + + + + + + + + + + + + + - - + + - - - + + + diff --git a/packages/grant-explorer/src/assets/preview_alt_5.svg b/packages/grant-explorer/src/assets/preview_alt_5.svg index 808c70013c..162f23ca93 100755 --- a/packages/grant-explorer/src/assets/preview_alt_5.svg +++ b/packages/grant-explorer/src/assets/preview_alt_5.svg @@ -1,120 +1,154 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + - + - + - + - - + + - - + + - - + + - - + + + + + + + + + + + + + + + + + + + + + - - + + - - - + + + diff --git a/packages/grant-explorer/src/features/attestations/MintProgressModalBody.tsx b/packages/grant-explorer/src/features/attestations/MintProgressModalBody.tsx index eee374d0c0..0e5bc3375d 100755 --- a/packages/grant-explorer/src/features/attestations/MintProgressModalBody.tsx +++ b/packages/grant-explorer/src/features/attestations/MintProgressModalBody.tsx @@ -40,7 +40,7 @@ const MintProgressModalBody = ({ isOnAction: boolean; }>) => (
-
{children}
+
{children}
); @@ -165,7 +165,7 @@ export function MintProgressModalBodyHistory( impactImageCid={impactImageCid as string} attestationLink={attestationLink ?? ""} isShareButtonsAbove={false} - imageSize="size-[288px] sm:size-[400px]" + // imageSize="size-[288px] sm:size-[400px]" /> ) : (
@@ -95,7 +95,7 @@ export const PreviewFrameHistoryPage = ({ return (
preview @@ -142,7 +142,7 @@ import { ImageWithLoading } from "../common/components/ImageWithLoading"; export const ImpactMintingSuccess = ({ attestationLink, impactImageCid, - imageSize = "size-[400px]", + imageSize = "w-full max-w-[700px] relative", isShareButtonsAbove = true, }: { attestationLink: string; diff --git a/packages/grant-explorer/src/features/common/components/ImageWithLoading.tsx b/packages/grant-explorer/src/features/common/components/ImageWithLoading.tsx index 07c5d023ea..941a09399c 100644 --- a/packages/grant-explorer/src/features/common/components/ImageWithLoading.tsx +++ b/packages/grant-explorer/src/features/common/components/ImageWithLoading.tsx @@ -1,24 +1,50 @@ -import React from "react"; +import React, { useEffect, useState } from "react"; export const ImageWithLoading = ({ src, - sizeClass = "w-[400px] h-[400px]", + sizeClass = "size-[400px]", isLoading, + style, + onAspectRatioChange, ...props }: { src: string | undefined; sizeClass?: string; isLoading: boolean; + style?: React.CSSProperties; + onAspectRatioChange?: (ratio: string) => void; } & React.HTMLProps) => { - // Handle loading and blur states + const [aspectRatio, setAspectRatio] = useState("2/1"); const loadingClass = isLoading ? "animate-pulse bg-gray-100" : ""; const blurClass = !src ? "blur-[40px]" : ""; + useEffect(() => { + if (src) { + const img = new Image(); + img.onload = () => { + console.log("img.width", img.width); + console.log("img.height", img.height); + + const ratio = `${img.width}/${img.height}`; + console.log("ratio", ratio); + setAspectRatio(ratio); + onAspectRatioChange?.(ratio); + }; + img.src = src; + } + }, [src, onAspectRatioChange]); + return (
); }; diff --git a/packages/grant-explorer/src/features/contributors/components/Buttons/MintingActionButton.tsx b/packages/grant-explorer/src/features/contributors/components/Buttons/MintingActionButton.tsx index 8c72a81226..a650d36484 100644 --- a/packages/grant-explorer/src/features/contributors/components/Buttons/MintingActionButton.tsx +++ b/packages/grant-explorer/src/features/contributors/components/Buttons/MintingActionButton.tsx @@ -62,7 +62,7 @@ export function MintingActionButton({ const { attestationChainId: chainId, attestationUid = "" } = attestation ?? {}; - const attestationLink = `https://attestation.gitcoin.co/attestation/${attestationUid}`; + const attestationLink = `${process.env.REACT_APP_ATTESTATION_SERVER}/attestation/${attestationUid}`; return isMinted ? ( <> diff --git a/packages/grant-explorer/src/features/contributors/components/ViewAttestationModal/ViewAttestationImage.tsx b/packages/grant-explorer/src/features/contributors/components/ViewAttestationModal/ViewAttestationImage.tsx index 681eb97ea9..973c6ecc8a 100644 --- a/packages/grant-explorer/src/features/contributors/components/ViewAttestationModal/ViewAttestationImage.tsx +++ b/packages/grant-explorer/src/features/contributors/components/ViewAttestationModal/ViewAttestationImage.tsx @@ -19,7 +19,7 @@ export function ViewAttestationImage({ return ( diff --git a/packages/grant-explorer/src/features/contributors/components/ViewAttestationModal/ViewAttestationModal.tsx b/packages/grant-explorer/src/features/contributors/components/ViewAttestationModal/ViewAttestationModal.tsx index f36e61b026..d54967167c 100644 --- a/packages/grant-explorer/src/features/contributors/components/ViewAttestationModal/ViewAttestationModal.tsx +++ b/packages/grant-explorer/src/features/contributors/components/ViewAttestationModal/ViewAttestationModal.tsx @@ -31,7 +31,7 @@ export function ViewAttestationModal({ return ( -
+

{title}

@@ -40,7 +40,7 @@ export function ViewAttestationModal({ onClick={() => window.open(transactionUrl, "_blank")} /> diff --git a/packages/grant-explorer/src/features/round/ThankYou.tsx b/packages/grant-explorer/src/features/round/ThankYou.tsx index d42e7c2a7a..830d4a3c35 100755 --- a/packages/grant-explorer/src/features/round/ThankYou.tsx +++ b/packages/grant-explorer/src/features/round/ThankYou.tsx @@ -193,7 +193,7 @@ export default function ThankYou() {
{/* Main content */} -
+

@@ -222,7 +222,7 @@ export default function ThankYou() {

) : minted ? ( -
+
Your donation impact @@ -235,7 +235,7 @@ export default function ThankYou() {
diff --git a/packages/grant-explorer/src/hooks/attestations/useColorAndBackground.ts b/packages/grant-explorer/src/hooks/attestations/useColorAndBackground.ts index 8cea3de6ba..7c2b5a64c5 100644 --- a/packages/grant-explorer/src/hooks/attestations/useColorAndBackground.ts +++ b/packages/grant-explorer/src/hooks/attestations/useColorAndBackground.ts @@ -13,10 +13,10 @@ import attestationFrameLogo from "../../assets/attestation-frame-logo.svg"; const useColorAndBackground = () => { const colorMapper = { - "0": "#8266BE", + "0": "#E3734C", "1": "#79A557", "2": "#9BC8E7", - "3": "#E3734C", + "3": "#8266BE", "4": "#BCBFBF", }; diff --git a/packages/grant-explorer/src/hooks/attestations/useEASAttestation.ts b/packages/grant-explorer/src/hooks/attestations/useEASAttestation.ts index 23ea4d0f8d..444e960e26 100644 --- a/packages/grant-explorer/src/hooks/attestations/useEASAttestation.ts +++ b/packages/grant-explorer/src/hooks/attestations/useEASAttestation.ts @@ -55,10 +55,11 @@ export const useEASAttestation = ( } updateStatus(ProgressStatus.IN_PROGRESS); const attestationUID = await attest.mutateAsync(data); - const attestationLink = `https://attestation.gitcoin.co/attestation/${attestationUID}`; + const attestationLink = `${process.env.REACT_APP_ATTESTATION_SERVER}/attestation/${attestationUID}`; updateStatus(ProgressStatus.IS_SUCCESS); return attestationLink; } catch (error) { + console.error("Error in handleAttest", error); updateStatus(ProgressStatus.IS_ERROR); } }; diff --git a/packages/grant-explorer/src/hooks/attestations/useGetAttestationData.ts b/packages/grant-explorer/src/hooks/attestations/useGetAttestationData.ts index ad762bd4be..8c9c816412 100644 --- a/packages/grant-explorer/src/hooks/attestations/useGetAttestationData.ts +++ b/packages/grant-explorer/src/hooks/attestations/useGetAttestationData.ts @@ -30,7 +30,7 @@ export const useGetAttestationData = ( try { const response = await fetch( - `https://attestation.gitcoin.co/api/getAttestation`, + `${process.env.REACT_APP_ATTESTATION_SERVER}/api/getAttestation`, { method: "POST", headers: {