Skip to content

Commit

Permalink
Update GoogleCalendarButton.tsx file and changed the button text and …
Browse files Browse the repository at this point in the history
…linked it to the common.json file
  • Loading branch information
BalrajDhakad authored Dec 19, 2024
1 parent c90b564 commit a766186
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion 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 @@ -25,10 +26,14 @@ export default function GoogleCalendarButton({
className
}: IGoogleCalendarButtonProps) {
const { t } = useTranslation('common');

// created a variable with name 'googleCalenderBtnText' to take the value from 'common.json' file to add text on the button

let googleCalenderBtnText = details.googleCalendarBtn;

return (
<Button
text={t(text)}
text={t(googleCalenderBtnText)}
icon={<IconGoogleCalendar />}
href={href}
iconPosition={iconPosition}
Expand Down

0 comments on commit a766186

Please sign in to comment.