From 35bee5ca6869cc29c0753579b531af53e360ac4e Mon Sep 17 00:00:00 2001 From: EhEhRon91 <65462273+EhEhRon91@users.noreply.github.com> Date: Mon, 20 Sep 2021 05:57:05 -0400 Subject: [PATCH] fix: message removed when not logged in (#43411) * fix: message removed when not logged in * removed unnecessary code from DonateCompletion.tsx that was added * now using isSignedIn in props and not donationFromState --- client/src/components/Donation/DonateCompletion.tsx | 4 +++- client/src/components/Donation/DonateForm.tsx | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/client/src/components/Donation/DonateCompletion.tsx b/client/src/components/Donation/DonateCompletion.tsx index d2b405ae59..955bbdb6e3 100644 --- a/client/src/components/Donation/DonateCompletion.tsx +++ b/client/src/components/Donation/DonateCompletion.tsx @@ -11,6 +11,7 @@ type DonateCompletionProps = { redirecting: boolean; reset: () => unknown; success: boolean; + isSignedIn: boolean; }; function DonateCompletion({ @@ -18,6 +19,7 @@ function DonateCompletion({ reset, success, redirecting, + isSignedIn, error = null }: DonateCompletionProps): JSX.Element { /* eslint-disable no-nested-ternary */ @@ -50,7 +52,7 @@ function DonateCompletion({ {success && (
{t('donate.free-tech')}
-{t('donate.no-halo')}
+ {isSignedIn &&{t('donate.no-halo')}
}{error}
} diff --git a/client/src/components/Donation/DonateForm.tsx b/client/src/components/Donation/DonateForm.tsx index e4c862f710..e6fe05569b 100644 --- a/client/src/components/Donation/DonateForm.tsx +++ b/client/src/components/Donation/DonateForm.tsx @@ -277,6 +277,7 @@ class DonateForm extends Component