overleaf/services/web/frontend/js/features/subscription/components/group-invites/group-invites-item-footer.tsx
M Fahru 0639f266d8 Merge pull request #14756 from overleaf/mf-group-invite-new-user-redirection
[web] Redirect to invite screen if new user register with a pending group invitations

GitOrigin-RevId: 39aeffd65b9d793c87e53398a700ad140794594e
2023-11-10 09:04:23 +00:00

28 lines
683 B
TypeScript

import { useTranslation } from 'react-i18next'
import type { TeamInvite } from '../../../../../../types/team-invite'
type GroupInvitesItemFooterProps = {
teamInvite: TeamInvite
}
export default function GroupInvitesItemFooter({
teamInvite,
}: GroupInvitesItemFooterProps) {
const { t } = useTranslation()
return (
<div>
<p data-cy="group-invites-item-footer-text">
{t('join_team_explanation')}
</p>
<div data-cy="group-invites-item-footer-link">
<a
className="btn btn-primary"
href={`/subscription/invites/${teamInvite.token}`}
>
{t('view_invitation')}
</a>
</div>
</div>
)
}