From f44f3bdaaecd971b6bafdf1978781d217ed2b7f7 Mon Sep 17 00:00:00 2001 From: Shubhashish-Chakraborty Date: Sat, 14 Dec 2024 09:45:50 +0530 Subject: [PATCH] GoogleCalender Button, ics File Download Button: text fixed in community/events --- components/buttons/GoogleCalendarButton.tsx | 6 +++++- components/buttons/ICSFileButton.tsx | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/components/buttons/GoogleCalendarButton.tsx b/components/buttons/GoogleCalendarButton.tsx index 15f16dca65f..5509ac7bde1 100644 --- a/components/buttons/GoogleCalendarButton.tsx +++ b/components/buttons/GoogleCalendarButton.tsx @@ -7,6 +7,10 @@ import { useTranslation } from '../../utils/i18n'; import IconGoogleCalendar from '../icons/GoogleCalendar'; import Button from './Button'; + +// Importing text to display on button from common.json +import { githubButton } from '../../public/locales/en/common.json'; + interface IGoogleCalendarButtonProps extends IButtonDefaultProps {} /** @@ -18,7 +22,7 @@ interface IGoogleCalendarButtonProps extends IButtonDefaultProps {} * @param {string} props.className - The class name to be applied to the button. */ export default function GoogleCalendarButton({ - text = 'googleCalendarBtn', + text = githubButton, href, target = '_blank', iconPosition = ButtonIconPosition.LEFT, diff --git a/components/buttons/ICSFileButton.tsx b/components/buttons/ICSFileButton.tsx index 1f529cee3c1..a150700b275 100644 --- a/components/buttons/ICSFileButton.tsx +++ b/components/buttons/ICSFileButton.tsx @@ -7,6 +7,9 @@ import { useTranslation } from '../../utils/i18n'; import IconCalendar from '../icons/Calendar'; import Button from './Button'; +// Importing text to display on button from common.json +import { icsFileBtn } from '../../public/locales/en/common.json'; + interface IICSFButtonProps extends IButtonDefaultProps {} /** @@ -18,7 +21,7 @@ interface IICSFButtonProps extends IButtonDefaultProps {} * @param {string} props.className - The class name to be applied to the button. */ export default function ICSFButton({ - text = 'icsFileBtn', + text = icsFileBtn, href, target = '_blank', iconPosition = ButtonIconPosition.LEFT,