fix: leave warning

chore/leave-team
Arik Chakma 1 year ago
parent 075d2dc6ea
commit 3c5562b525
  1. 16
      src/components/TeamMembers/LeaveTeamPopup.tsx

@ -28,7 +28,7 @@ export function LeaveTeamPopup(props: LeaveTeamPopupProps) {
setIsLoading(true);
setError('');
if (confirmationText.toUpperCase() !== 'DELETE') {
if (confirmationText.toUpperCase() !== 'LEAVE') {
setError('Verification text does not match');
setIsLoading(false);
return;
@ -65,8 +65,14 @@ export function LeaveTeamPopup(props: LeaveTeamPopupProps) {
ref={popupBodyRef}
class="popup-body relative rounded-lg bg-white p-4 shadow"
>
<p className="-mb-2 text-base font-medium text-black">
Please type "delete" to confirm.
<h2 class="text-2xl font-semibold text-black">
Leave Team
</h2>
<p className="text-gray-500">
You will lose access to the team, the roadmaps and progress of other team members.
</p>
<p className="-mb-2 mt-3 text-base font-medium text-black">
Please type "leave" to confirm.
</p>
<form onSubmit={handleSubmit}>
<div className="my-4">
@ -76,7 +82,7 @@ export function LeaveTeamPopup(props: LeaveTeamPopupProps) {
name="leave-team"
id="leave-team"
className="mt-2 block w-full rounded-md border border-gray-300 px-3 py-2 outline-none placeholder:text-gray-400 focus:border-gray-400"
placeholder={'Type "delete" to confirm'}
placeholder={'Type "leave" to confirm'}
required
autoFocus
value={confirmationText}
@ -103,7 +109,7 @@ export function LeaveTeamPopup(props: LeaveTeamPopupProps) {
<button
type="submit"
disabled={
isLoading || confirmationText.toUpperCase() !== 'DELETE'
isLoading || confirmationText.toUpperCase() !== 'LEAVE'
}
className="flex-grow cursor-pointer rounded-lg bg-red-500 py-2 text-white disabled:opacity-40"
>

Loading…
Cancel
Save