fix: workspace invitations response updated (#3321)
This commit is contained in:
parent
efd3ebf067
commit
0a05aef046
4 changed files with 18 additions and 14 deletions
|
|
@ -83,7 +83,7 @@ const UserInvitationsPage: NextPageWithLayout = observer(() => {
|
|||
.then((res) => {
|
||||
mutate("USER_WORKSPACES");
|
||||
const firstInviteId = invitationsRespond[0];
|
||||
const redirectWorkspace = invitations?.find((i) => i.id === firstInviteId)?.workspace_detail;
|
||||
const redirectWorkspace = invitations?.find((i) => i.id === firstInviteId)?.workspace;
|
||||
postHogEventTracker("MEMBER_ACCEPTED", {
|
||||
...res,
|
||||
state: "SUCCESS",
|
||||
|
|
@ -153,23 +153,23 @@ const UserInvitationsPage: NextPageWithLayout = observer(() => {
|
|||
>
|
||||
<div className="flex-shrink-0">
|
||||
<div className="grid h-9 w-9 place-items-center rounded">
|
||||
{invitation.workspace_detail.logo && invitation.workspace_detail.logo.trim() !== "" ? (
|
||||
{invitation.workspace.logo && invitation.workspace.logo.trim() !== "" ? (
|
||||
<img
|
||||
src={invitation.workspace_detail.logo}
|
||||
src={invitation.workspace.logo}
|
||||
height="100%"
|
||||
width="100%"
|
||||
className="rounded"
|
||||
alt={invitation.workspace_detail.name}
|
||||
alt={invitation.workspace.name}
|
||||
/>
|
||||
) : (
|
||||
<span className="grid h-9 w-9 place-items-center rounded bg-gray-700 px-3 py-1.5 uppercase text-white">
|
||||
{invitation.workspace_detail.name[0]}
|
||||
{invitation.workspace.name[0]}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="text-sm font-medium">{truncateText(invitation.workspace_detail.name, 30)}</div>
|
||||
<div className="text-sm font-medium">{truncateText(invitation.workspace.name, 30)}</div>
|
||||
<p className="text-xs text-custom-text-200">{ROLE[invitation.role]}</p>
|
||||
</div>
|
||||
<span
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue