Skip to content

Commit ecfe51e

Browse files
fix: remove layout shift
1 parent a97aaad commit ecfe51e

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

frontend/routes/@[scope]/(_islands)/ScopeMemberLeave.tsx

+11-11
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,6 @@ export function ScopeMemberLeave({
4444
scope{isAdmin && " or manage members"}.
4545
</p>
4646
<input type="hidden" name="userId" value={userId} />
47-
{(isLastAdmin || isInvalidInput.value) && (
48-
<div class="mt-6 border rounded-md border-red-300 bg-red-50 p-6 text-red-600">
49-
<span class="font-bold text-xl">Warning</span>
50-
<p>
51-
{isLastAdmin &&
52-
"You are the last admin in this scope. You must promote another member to admin before leaving."}
53-
{isInvalidInput.value &&
54-
"The scope name you entered does not match the scope name."}
55-
</p>
56-
</div>
57-
)}
5847
<div class="mt-4 flex justify-between gap-4">
5948
<input
6049
type="text"
@@ -80,6 +69,17 @@ export function ScopeMemberLeave({
8069
<TbArrowRightFromArc class="size-5 ml-2 rotate-180" />
8170
</button>
8271
</div>
72+
{(isLastAdmin || isInvalidInput.value) && (
73+
<div class="mt-6 border rounded-md border-red-300 bg-red-50 p-6 text-red-600">
74+
<span class="font-bold text-xl">Warning</span>
75+
<p>
76+
{isLastAdmin &&
77+
"You are the last admin in this scope. You must promote another member to admin before leaving."}
78+
{isInvalidInput.value &&
79+
"The scope name you entered does not match the scope name."}
80+
</p>
81+
</div>
82+
)}
8383
</form>
8484
);
8585
}

0 commit comments

Comments
 (0)