Files
myeasycms-v2/apps/web/app/home/(user)/_components/home-add-account-button.tsx
giancarlo f7be3e84f4 Add localization for teams-related strings in home component
Support for internationalization was added to the account components related to teams. This includes localizing messages prompting a user to create a team which were previously hardcoded. Additionally, `Trans` components from '@kit/ui/trans' has been imported and used to enable this.
2024-05-13 14:17:25 +07:00

25 lines
599 B
TypeScript

'use client';
import { useState } from 'react';
import { CreateTeamAccountDialog } from '@kit/team-accounts/components';
import { Button } from '@kit/ui/button';
import { Trans } from '@kit/ui/trans';
export function HomeAddAccountButton() {
const [isAddingAccount, setIsAddingAccount] = useState(false);
return (
<>
<Button size="sm" onClick={() => setIsAddingAccount(true)}>
<Trans i18nKey={'account:createTeamButtonLabel'} />
</Button>
<CreateTeamAccountDialog
isOpen={isAddingAccount}
setIsOpen={setIsAddingAccount}
/>
</>
);
}