mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
chore: display join button text based on invitation type (#12650)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - The button on the Request to Join page now dynamically updates its label to show "accept invitation" when an invitation is pending, improving clarity for users responding to workspace invites. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -2,7 +2,10 @@ import {
|
||||
AuthPageContainer,
|
||||
type User,
|
||||
} from '@affine/component/auth-components';
|
||||
import type { GetInviteInfoQuery } from '@affine/graphql';
|
||||
import {
|
||||
type GetInviteInfoQuery,
|
||||
WorkspaceMemberStatus,
|
||||
} from '@affine/graphql';
|
||||
import { useI18n } from '@affine/i18n';
|
||||
import { SignOutIcon } from '@blocksuite/icons/rc';
|
||||
|
||||
@@ -51,7 +54,9 @@ export const RequestToJoinPage = ({
|
||||
}
|
||||
>
|
||||
<Button variant="primary" size="large" onClick={requestToJoin}>
|
||||
{t['com.affine.request-to-join-workspace.button']()}
|
||||
{inviteInfo?.status === WorkspaceMemberStatus.Pending
|
||||
? t['com.affine.notification.invitation.accept']()
|
||||
: t['com.affine.request-to-join-workspace.button']()}
|
||||
</Button>
|
||||
{user ? (
|
||||
<div className={styles.userInfoWrapper}>
|
||||
|
||||
Reference in New Issue
Block a user