From 7b08d77edeb2be8b9828fad07a449a3bc3f0f2cd Mon Sep 17 00:00:00 2001 From: Ramin Date: Thu, 19 Sep 2024 15:40:59 +0330 Subject: [PATCH] fix passport banner position --- src/components/views/donate/DonateIndex.tsx | 186 +++++++++++--------- 1 file changed, 99 insertions(+), 87 deletions(-) diff --git a/src/components/views/donate/DonateIndex.tsx b/src/components/views/donate/DonateIndex.tsx index b4f8904b80..e8022b8a98 100644 --- a/src/components/views/donate/DonateIndex.tsx +++ b/src/components/views/donate/DonateIndex.tsx @@ -21,7 +21,6 @@ import useDetectDevice from '@/hooks/useDetectDevice'; import { useIsSafeEnvironment } from '@/hooks/useSafeAutoConnect'; import { useDonateData } from '@/context/donate.context'; import { EContentType } from '@/lib/constants/shareContent'; -import { PassportBanner } from '@/components/PassportBanner'; import { useAlreadyDonatedToProject } from '@/hooks/useAlreadyDonatedToProject'; import { Shadow } from '@/components/styled-components/Shadow'; import { useAppDispatch, useAppSelector } from '@/features/hooks'; @@ -46,6 +45,7 @@ import EndaomentProjectsInfo from '@/components/views/project/EndaomentProjectsI import { IDraftDonation } from '@/apollo/types/gqlTypes'; import StorageLabel from '@/lib/localStorage'; import DonationByProjectOwner from '@/components/modals/DonationByProjectOwner'; +import { PassportBanner } from '@/components/PassportBanner'; const DonateIndex: FC = () => { const { formatMessage } = useIntl(); @@ -222,103 +222,115 @@ const DonateIndex: FC = () => { ) : ( <> - - {showDonationByProjectOwner && ( - - )} - {alreadyDonated && !isQRDonation && ( - - - - {formatMessage({ - id: 'component.already_donated.incorrect_estimate', - })} - - - )} + {!isSafeEnv && hasActiveQFRound && !isOnSolana && !isQRDonation && } - - - - + {showDonationByProjectOwner && ( + - - - - {showQRCode ? ( - - ) : ( - <> - - - + + + {formatMessage({ + id: 'component.already_donated.incorrect_estimate', + })} + + + )} + + + + + + + + {showQRCode ? ( + + ) : ( + <> + - - {!isMobile ? ( - (!isQRDonation && - !isRecurringTab && - hasActiveQFRound) || - (isRecurringTab && - isOnEligibleNetworks) ? ( - - ) : ( - + - ) - ) : null} - + + {!isMobile ? ( + (!isQRDonation && + !isRecurringTab && + hasActiveQFRound) || + (isRecurringTab && + isOnEligibleNetworks) ? ( + + ) : ( + + ) + ) : null} + + )} + + {isFailedOperation && ( + + + {formatMessage({ + id: 'label.need_a_new_qr_code', + })} + + + + )} - - {isFailedOperation && ( - - - {formatMessage({ - id: 'label.need_a_new_qr_code', - })} - - - - - )} - - - {!isMobile && ( - - )} - + + + {!isMobile && ( + + )} + + ); }; +const Wrapper = styled.div` + margin-top: 91px; +`; + const AlreadyDonatedWrapper = styled(Flex)` margin-bottom: 16px; padding: 12px 16px; @@ -332,7 +344,7 @@ const AlreadyDonatedWrapper = styled(Flex)` const DonateContainer = styled(Container)` text-align: center; - padding-top: 110px; + padding-top: 10px; padding-bottom: 64px; position: relative; `;