From a6a75cff585b397b19220867c9e2e7c471559dd8 Mon Sep 17 00:00:00 2001 From: barshathakuri Date: Wed, 11 Dec 2024 14:04:59 +0545 Subject: [PATCH] Remove resources page summary --- src/views/Home/i18n.json | 2 +- src/views/Home/index.tsx | 11 ++++++++++- src/views/RecoverAccount/index.tsx | 2 +- src/views/RecoverAccountConfirm/index.tsx | 1 + src/views/Register/index.tsx | 1 + src/views/Resources/index.tsx | 3 +-- 6 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/views/Home/i18n.json b/src/views/Home/i18n.json index 8eea42b3..69886b63 100644 --- a/src/views/Home/i18n.json +++ b/src/views/Home/i18n.json @@ -10,7 +10,7 @@ "addSubscriptionDescription": "With real-time monitoring of potential risks and emergency events, receive timely and accurate alerts.", "useApi": "Use API to rebroadcast CAP alerts", "useApiDescription": "With simple yet powerful API endpoints, you can tailor the alerts to suit your users' needs.", - "alertNewSubscription": "Subscribe Alerts ", + "alertNewSubscription": "Subscribe to Alerts ", "alertApiReference": "API Reference" } } diff --git a/src/views/Home/index.tsx b/src/views/Home/index.tsx index 9ae2e002..d3eb2e3f 100644 --- a/src/views/Home/index.tsx +++ b/src/views/Home/index.tsx @@ -27,6 +27,7 @@ import { AlertFilter, CountryDetailQuery, } from '#generated/types/graphql'; +import useAuth from '#hooks/domain/useAuth'; import useUrlSearchState from '#hooks/useUrlSearchState'; import NewSubscriptionModal from '#views/NewSubscriptionModal'; @@ -86,6 +87,7 @@ const filterKeys: CombinedAlertFilterKey[] = ['country', 'admin1', 'region', 'ur // eslint-disable-next-line import/prefer-default-export export function Component() { const strings = useTranslation(i18n); + const { isAuthenticated } = useAuth(); const [ filters, @@ -266,7 +268,7 @@ export function Component() { heading={strings.addSubscription} headerDescription={strings.addSubscriptionDescription} withInternalPadding - footerContent={( + footerContent={isAuthenticated ? ( + ) : ( + + {strings.alertNewSubscription} + )} /> - ); } @@ -183,6 +182,7 @@ export function Component() { name="captcha" onChange={setFieldValue} onError={onCaptchaError} + error={fieldError?.captcha} />