From 0ad26e991d492e2754475a4e6afa8ab3381b56e0 Mon Sep 17 00:00:00 2001 From: giancarlo Date: Thu, 25 Apr 2024 19:56:30 +0700 Subject: [PATCH] Update invitation acceptance UI for clarity Updated the invitation acceptance interface components. The 'Join Team' button text has been changed to reflect the user's email. This provides the user more clarity about which account they are accepting the invitation for. Other minor adjustments were made to the layout and heading level for consistency and improved readability. --- apps/web/app/join/page.tsx | 3 +++ apps/web/public/locales/en/teams.json | 2 +- .../invitations/accept-invitation-container.tsx | 10 +++++++--- .../invitations/invitation-submit-button.tsx | 8 ++++++-- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/apps/web/app/join/page.tsx b/apps/web/app/join/page.tsx index 6acf94a7f..3b8212d71 100644 --- a/apps/web/app/join/page.tsx +++ b/apps/web/app/join/page.tsx @@ -94,8 +94,11 @@ async function JoinTeamAccountPage({ searchParams }: Context) { invitation.account.slug, ); + const email = auth.data.email ?? ''; + return ( - + -
+
- + diff --git a/packages/features/team-accounts/src/components/invitations/invitation-submit-button.tsx b/packages/features/team-accounts/src/components/invitations/invitation-submit-button.tsx index ea65f65c9..17a74c5ec 100644 --- a/packages/features/team-accounts/src/components/invitations/invitation-submit-button.tsx +++ b/packages/features/team-accounts/src/components/invitations/invitation-submit-button.tsx @@ -5,15 +5,19 @@ import { useFormStatus } from 'react-dom'; import { Button } from '@kit/ui/button'; import { Trans } from '@kit/ui/trans'; -export function InvitationSubmitButton(props: { accountName: string }) { +export function InvitationSubmitButton(props: { + accountName: string; + email: string; +}) { const { pending } = useFormStatus(); return (