Files
medreport_mrb2b/app/home/(user)/_components/home-add-account-button.tsx
2025-06-08 16:18:30 +03:00

28 lines
669 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(props: { className?: string }) {
const [isAddingAccount, setIsAddingAccount] = useState(false);
return (
<>
<Button
className={props.className}
onClick={() => setIsAddingAccount(true)}
>
<Trans i18nKey={'account:createTeamButtonLabel'} />
</Button>
<CreateTeamAccountDialog
isOpen={isAddingAccount}
setIsOpen={setIsAddingAccount}
/>
</>
);
}