second review

This commit is contained in:
counterweight 2025-12-20 11:58:35 +01:00
parent 23049da55a
commit 976a880312
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
7 changed files with 105 additions and 65 deletions

View file

@ -80,7 +80,7 @@ export default function AdminInvitesPage() {
const handleCreateInvite = async () => {
if (!newGodfatherId) {
setCreateError("Please enter a godfather user ID");
setCreateError("Please select a godfather");
return;
}
@ -104,6 +104,7 @@ export default function AdminInvitesPage() {
const handleRevoke = async (inviteId: number) => {
try {
await api.post(`/api/admin/invites/${inviteId}/revoke`);
setError(null);
fetchInvites(page, statusFilter);
} catch (err) {
setError(err instanceof Error ? err.message : "Failed to revoke invite");
@ -328,16 +329,6 @@ const pageStyles: Record<string, React.CSSProperties> = {
fontSize: "0.8rem",
color: "rgba(255, 255, 255, 0.5)",
},
input: {
fontFamily: "'DM Sans', system-ui, sans-serif",
fontSize: "0.9rem",
padding: "0.75rem",
background: "rgba(255, 255, 255, 0.05)",
border: "1px solid rgba(255, 255, 255, 0.1)",
borderRadius: "8px",
color: "#fff",
maxWidth: "300px",
},
select: {
fontFamily: "'DM Sans', system-ui, sans-serif",
fontSize: "0.9rem",

View file

@ -19,7 +19,8 @@ export default function SignupWithCodePage() {
router.replace("/");
} else {
// Redirect to signup with code as query param
router.replace(`/signup?code=${encodeURIComponent(code)}`);
// Invite codes only contain [a-z0-9-] so no encoding needed
router.replace(`/signup?code=${code}`);
}
}, [user, isLoading, code, router]);
@ -37,4 +38,3 @@ export default function SignupWithCodePage() {
</main>
);
}