@@ -327,19 +327,6 @@ const FundingDetailsPage = () => {
327327 ? formatAmountUsdc ( usdcTokenBalance . balance )
328328 : "0.00" ;
329329
330- // REMOVE ALL THIS ONES LATER
331- const SPECIAL_POOL_ADDRESS =
332- "0x0491e7064752699c7b15fe2476319b3d04bec0404f98f3d57c2e1cff2239fc1f" ;
333- const isSpecialPool =
334- crowdFundingAddr &&
335- crowdFundingAddr . toLowerCase ( ) === SPECIAL_POOL_ADDRESS . toLowerCase ( ) ;
336-
337- const finalTargetAmount = isSpecialPool ? "300.00" : targetAmount ;
338-
339- const isFinalCompleted = isSpecialPool
340- ? Number ( amountRaised ) >= 300
341- : pool ?. is_completed || usdcBalance ?. crowd_funding ?. is_complete ;
342-
343330 useEffect ( ( ) => {
344331 getUsdcBalance ( ) ;
345332
@@ -493,7 +480,7 @@ Every contribution counts — let's build something amazing together! 💫
493480 return (
494481 < div className = "min-h-screen mb-10 relative" >
495482 { /* Pool Completed Overlay */ }
496- { /* { pool?.is_completed && (
483+ { pool ?. is_completed && (
497484 < div className = "fixed inset-0 z-50 flex items-center justify-center bg-[#00000036] bg-opacity-50 backdrop-blur-sm animate-in fade-in duration-300" >
498485 < div className = "bg-[#1F2937] border border-[#10B981] rounded-lg p-8 max-w-md mx-4 text-center shadow-2xl animate-in zoom-in-95 duration-300" >
499486 < div className = "w-16 h-16 bg-[#10B981] rounded-full flex items-center justify-center mx-auto mb-4 animate-pulse" >
@@ -510,9 +497,7 @@ Every contribution counts — let's build something amazing together! 💫
510497 < div className = "flex justify-between items-center text-sm" >
511498 < span className = "text-[#6EE7B7]" > Final Amount Raised:</ span >
512499 < span className = "text-[#10B981] font-bold" >
513- {formatAmountUsdc(
514- usdcBalance?.token_history?.[0]?.balance as string
515- )}{" "}
500+ { amountRaised }
516501 USDC
517502 </ span >
518503 </ div >
@@ -541,74 +526,15 @@ Every contribution counts — let's build something amazing together! 💫
541526 </ button >
542527 </ div >
543528 </ div >
544- )} */ }
545-
546- { isFinalCompleted && (
547- < div className = "fixed inset-0 z-50 flex items-center justify-center bg-[#00000036] bg-opacity-50 backdrop-blur-sm animate-in fade-in duration-300" >
548- < div className = "bg-[#1F2937] border border-[#10B981] rounded-lg p-8 max-w-md mx-4 text-center shadow-2xl animate-in zoom-in-95 duration-300" >
549- < div className = "w-16 h-16 bg-[#10B981] rounded-full flex items-center justify-center mx-auto mb-4 animate-pulse" >
550- < Check className = "w-8 h-8 text-white" />
551- </ div >
552- < h2 className = "text-2xl font-bold text-[#10B981] mb-2" >
553- Campaign Completed! 🎉
554- </ h2 >
555- < p className = "text-[#DFDFE0] mb-4" >
556- This funding campaign has reached its target goal and is now
557- closed.
558- </ p >
559- < div className = "bg-[#064E3B] border border-[#10B981] rounded-sm p-4 mb-6" >
560- < div className = "flex justify-between items-center text-sm" >
561- < span className = "text-[#6EE7B7]" > Final Amount Raised:</ span >
562- < span className = "text-[#10B981] font-bold" >
563- { /* {(Number.parseFloat(pool.balance.toString()) / 1e18).toFixed(
564- 2
565- )}{" "} */ }
566- { formatAmountUsdc (
567- usdcBalance ?. token_history ?. [ 0 ] ?. balance as string
568- ) } { " " }
569- USDC
570- </ span >
571- </ div >
572- < div className = "flex justify-between items-center text-sm mt-2" >
573- < span className = "text-[#6EE7B7]" > Target Goal:</ span >
574- < span className = "text-[#DFDFE0]" > { finalTargetAmount } USDC</ span >
575- { /* <span className="text-[#DFDFE0]">{targetAmount} USDC</span> */ }
576- </ div >
577- < div className = "flex justify-between items-center text-sm mt-2" >
578- < span className = "text-[#51be58]" > Donors:</ span >
579- < span className = "text-[#DFDFE0]" >
580- { usdcBalance ?. donation_count ?. total_donors || 0 }
581- </ span >
582- </ div >
583- < div className = "flex justify-between items-center text-sm mt-2" >
584- < span className = "text-[#6EE7B7] font-medium" >
585- Date Created:
586- </ span >
587- < span className = "text-[#DFDFE0]" > { pool . create_at } </ span >
588- </ div >
589- </ div >
590- < button
591- onClick = { ( ) => router . push ( "/dashboard/crowd-fund" ) }
592- className = "w-full bg-gradient-to-r from-[#10B981] to-[#059669] text-white py-3 px-4 rounded-sm hover:opacity-90 transition-opacity duration-200 font-medium cursor-pointer"
593- >
594- Back to All Campaigns
595- </ button >
596- </ div >
597- </ div >
598529 ) }
599530
600531 { /* Header */ }
601- { /* <div
532+ < div
602533 className = { `mb-8 border-b border-[#FFFFFF0D] pb-8 ${
603534 usdcBalance ?. crowd_funding ?. is_complete
604535 ? "blur-sm pointer-events-none"
605536 : ""
606537 } `}
607- > */ }
608- < div
609- className = { `mb-8 border-b border-[#FFFFFF0D] pb-8 ${
610- isFinalCompleted ? "blur-sm pointer-events-none" : ""
611- } `}
612538 >
613539 < button
614540 onClick = { ( ) => router . push ( "/dashboard/crowd-fund" ) }
@@ -626,8 +552,7 @@ Every contribution counts — let's build something amazing together! 💫
626552 { /* Share Section - Compact */ }
627553 < div
628554 className = { `mb-6 ${
629- isFinalCompleted ? "blur-sm pointer-events-none" : ""
630- // pool.is_completed ? "blur-sm pointer-events-none" : ""
555+ pool . is_completed ? "blur-sm pointer-events-none" : ""
631556 } `}
632557 >
633558 < div className = "flex items-center flex-wrap gap-2 sm:gap-4" >
@@ -663,8 +588,7 @@ Every contribution counts — let's build something amazing together! 💫
663588
664589 < div
665590 className = { `flex items-center gap-2 mb-5 ${
666- isFinalCompleted ? "blur-sm pointer-events-none" : ""
667- // pool.is_completed ? "blur-sm pointer-events-none" : ""
591+ pool . is_completed ? "blur-sm pointer-events-none" : ""
668592 } `}
669593 >
670594 < span className = "text-[#434672] font-semibold" >
@@ -689,10 +613,9 @@ Every contribution counts — let's build something amazing together! 💫
689613
690614 < div
691615 className = { `grid grid-cols-1 lg:grid-cols-3 gap-8 ${
692- isFinalCompleted ? "blur-sm pointer-events-none" : ""
693- // usdcBalance?.crowd_funding?.is_complete
694- // ? "blur-sm pointer-events-none"
695- // : ""
616+ usdcBalance ?. crowd_funding ?. is_complete
617+ ? "blur-sm pointer-events-none"
618+ : ""
696619 } `}
697620 >
698621 { /* Main Content */ }
@@ -710,7 +633,7 @@ Every contribution counts — let's build something amazing together! 💫
710633 </ div >
711634
712635 < div className = "space-y-2" >
713- { /* <h2 className="text-white font-extrabold text-xl">
636+ < h2 className = "text-white font-extrabold text-xl" >
714637 { usdcBalance ?. crowd_funding . is_complete
715638 ? 100
716639 : Math . min (
@@ -745,39 +668,6 @@ Every contribution counts — let's build something amazing together! 💫
745668 < div className = "flex justify-between text-sm text-[#8398AD]" >
746669 < span > Raised: { amountRaised } USDC</ span >
747670 < span > Target: { targetAmount } USDC</ span >
748- </div> */ }
749- < h2 className = "text-white font-extrabold text-xl" >
750- { isFinalCompleted
751- ? 100
752- : Math . min (
753- ( Number ( amountRaised ) / Number ( finalTargetAmount ) ) *
754- 100 ,
755- 100
756- ) . toFixed ( 2 ) }
757- %
758- </ h2 > { " " }
759- < div className = "w-full bg-[#282e38] rounded-full h-2.5" >
760- < div
761- className = { `bg-blue-600 h-2.5 rounded-full transition-all duration-300` }
762- style = { {
763- width : `${
764- ! isFinalCompleted
765- ? Math . min (
766- ( Number ( amountRaised ) /
767- Number ( finalTargetAmount ) ) *
768- 100 ,
769- 100
770- )
771- : 100
772- } %`,
773- } }
774- >
775- { " " }
776- </ div >
777- </ div >
778- < div className = "flex justify-between text-sm text-[#8398AD]" >
779- < span > Raised: { amountRaised } USDC</ span >
780- < span > Target: { finalTargetAmount } USDC</ span >
781671 </ div >
782672 </ div >
783673 </ div >
@@ -836,8 +726,7 @@ Every contribution counts — let's build something amazing together! 💫
836726 < Target className = "w-5 h-5 text-[#8398AD]" />
837727 < div >
838728 < p className = "text-[#DFDFE0] font-medium" >
839- { finalTargetAmount } USDC
840- { /* {targetAmount} USDC */ }
729+ { targetAmount } USDC
841730 </ p >
842731 < p className = "text-[#8398AD] text-sm" > Target Amount</ p >
843732 </ div >
@@ -846,8 +735,7 @@ Every contribution counts — let's build something amazing together! 💫
846735 </ div >
847736
848737 { /* Contribute Button */ }
849- { /* {!pool.is_completed && ( */ }
850- { ! isFinalCompleted && (
738+ { ! pool . is_completed && (
851739 < div className = "bg-[#FFFFFF0D] border border-[#FFFFFF0D] rounded-sm p-6" >
852740 < h3 className = "text-[#DFDFE0] font-medium text-lg mb-4" >
853741 Support This Campaign
0 commit comments