Skip to content

Commit

Permalink
Update ICSFileButton.tsx file and updated the text on the button 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 a766186 commit 3cbb46a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion 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';

interface IICSFButtonProps extends IButtonDefaultProps {}

Expand All @@ -26,9 +27,13 @@ export default function ICSFButton({
}: IICSFButtonProps) {
const { t } = useTranslation('common');

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

let icsFileBtnText = details.icsFileBtn;

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

0 comments on commit 3cbb46a

Please sign in to comment.