@@ -75,6 +75,8 @@ function RemoveTeammateModal({
7575 setRemoving ( false ) ;
7676 } ;
7777
78+ const self = session ?. user ?. email === user . email ;
79+
7880 return (
7981 < Modal
8082 showModal = { showRemoveTeammateModal }
@@ -85,24 +87,22 @@ function RemoveTeammateModal({
8587 < h3 className = "text-lg font-medium" >
8688 { invite
8789 ? "Revoke Invitation"
88- : session ?. user ?. email === user . email
90+ : self
8991 ? "Leave Workspace"
9092 : "Remove Teammate" }
9193 </ h3 >
9294 < p className = "text-sm text-neutral-500" >
9395 { invite
9496 ? "This will revoke "
95- : session ?. user ?. email === user . email
97+ : self
9698 ? "You're about to leave "
9799 : "This will remove " }
98100 < span className = "font-semibold text-black" >
99- { session ?. user ?. email === user . email
100- ? workspaceName
101- : user . name || user . email }
101+ { self ? workspaceName : user . name || user . email }
102102 </ span >
103103 { invite
104104 ? "'s invitation to join your workspace. "
105- : session ?. user ?. email === user . email
105+ : self
106106 ? ". You will lose all access to this workspace. "
107107 : " from your workspace. " }
108108 Are you sure you want to continue?
@@ -121,9 +121,10 @@ function RemoveTeammateModal({
121121 </ h3 >
122122
123123 < p className = "text-sm font-normal text-amber-900" >
124- This user has { user . restrictedTokens . length } active tokens.
125- Removing this user will invalidate these tokens and may disrupt
126- the integration.
124+ { self ? "You have" : "This user has" } { " " }
125+ { user . restrictedTokens . length } active tokens.{ " " }
126+ { self ? "Leaving" : "Removing this user" } will invalidate these
127+ tokens and may disrupt the integration.
127128 </ p >
128129
129130 < div >
@@ -156,7 +157,7 @@ function RemoveTeammateModal({
156157 </ div >
157158
158159 < Button
159- text = "Delete"
160+ text = { self ? "Leave" : "Remove" }
160161 variant = "danger"
161162 autoFocus = { ! isMobile }
162163 loading = { removing }
0 commit comments