fix: extract room quick-entry form into Client Component to fix Server Component event handler error
Deploy / release (push) Skipped
Deploy / deploy (push) Successful in 1m48s

- Move inline form with onSubmit handler from top-header.tsx (Server Component) into new RoomQuickEntry Client Component
- Add badges section to /me page showing equipped badges from users_badges
- Add last website login timestamp from website_login_logs to /me page stats
- Add search bar to top-header for user search
- Add achievement score, respects received, friend count stats to /me page
- Add quick links card to /me page with Messages/Profile/Settings/Shop
- Clean up RoomQuickEntry: use form.elements.namedItem, remove unused ref, add aria-label
This commit is contained in:
openhands committed 2026-07-26 16:43:13 +02:00
1 parent 29cd09e458
commit 0869b82f5f
3 files changed
+209 -35

No files matched your search

+42
View File
@@ -0,0 +1,42 @@
"use client";
export function RoomQuickEntry() {
return (
<form
action="/client"
method="GET"
className="hidden sm:flex items-center gap-1"
onSubmit={(e) => {
const form = e.currentTarget;
const input = form.elements.namedItem("roomId") as HTMLInputElement | null;
if (input?.value) {
form.action = `/room/${input.value}`;
}
}}
>
<input
type="number"
name="roomId"
placeholder="Room ID"
aria-label="Room ID"
min={1}
className="w-20 rounded-lg border px-2 py-1 text-xs font-medium"
style={{
background: "var(--color-background)",
color: "var(--color-text-readable)",
borderColor: "color-mix(in srgb, var(--color-text-muted) 25%, transparent)",
}}
/>
<button
type="submit"
className="rounded-lg px-2 py-1 text-xs font-bold transition-colors"
style={{
background: "color-mix(in srgb, var(--color-primary) 20%, transparent)",
color: "var(--color-primary-readable, var(--color-primary))",
}}
>
Go
</button>
</form>
);
}