Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixed text on the events page two buttons and linked it to the common.json file #3488

Closed
5 changes: 3 additions & 2 deletions components/buttons/GoogleCalendarButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type { IButtonDefaultProps } from '../../types/components/buttons/types';
import { useTranslation } from '../../utils/i18n';
import IconGoogleCalendar from '../icons/GoogleCalendar';
import Button from './Button';
import details from '../../public/locales/en/common.json';

interface IGoogleCalendarButtonProps extends IButtonDefaultProps {}

Expand All @@ -18,7 +19,6 @@ interface IGoogleCalendarButtonProps extends IButtonDefaultProps {}
* @param {string} props.className - The class name to be applied to the button.
*/
export default function GoogleCalendarButton({
text = 'googleCalendarBtn',
href,
target = '_blank',
iconPosition = ButtonIconPosition.LEFT,
Expand All @@ -28,7 +28,7 @@ export default function GoogleCalendarButton({

return (
<Button
text={t(text)}
text={t(details.googleCalendarBtn)}
icon={<IconGoogleCalendar />}
href={href}
iconPosition={iconPosition}
Expand All @@ -38,3 +38,4 @@ export default function GoogleCalendarButton({
/>
);
}

5 changes: 3 additions & 2 deletions components/buttons/ICSFileButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type { IButtonDefaultProps } from '../../types/components/buttons/types';
import { useTranslation } from '../../utils/i18n';
import IconCalendar from '../icons/Calendar';
import Button from './Button';
import details from '../../public/locales/en/common.json';
BalrajDhakad marked this conversation as resolved.
Show resolved Hide resolved

interface IICSFButtonProps extends IButtonDefaultProps {}

Expand All @@ -18,7 +19,6 @@ interface IICSFButtonProps extends IButtonDefaultProps {}
* @param {string} props.className - The class name to be applied to the button.
*/
export default function ICSFButton({
text = 'icsFileBtn',
href,
target = '_blank',
iconPosition = ButtonIconPosition.LEFT,
Expand All @@ -28,7 +28,7 @@ export default function ICSFButton({

return (
<Button
text={t(text)}
text={t(details.icsFileBtn)}
icon={<IconCalendar />}
href={href}
iconPosition={iconPosition}
Expand All @@ -38,3 +38,4 @@ export default function ICSFButton({
/>
);
}

Loading