Fix frontend lint: links, unused code, quotes, img elements

- Internal links use next/link instead of <a> (no full page reload).
- Remove dead code: RegisterForm's unreachable Yoco checkout branch, the
  unused AttendeeForms on the registration success page, unused Geist
  fonts, and assorted unused variables and catch bindings.
- Escape quotes in JSX text; replace @ts-ignore in apiFetch with a cast.
- Keep the intentional raw <img> elements (data URLs, runtime API host)
  with a documented lint exception; the event editor uses ApiImage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-21 11:10:00 +02:00
co-authored by Claude Opus 5.5
parent 700b220906
commit 9e8244bb71
33 changed files with 73 additions and 266 deletions
@@ -243,7 +243,7 @@ export default function ReportsV2({ onBack }: { onBack?: () => void } = {}) {
try {
const list = await apiFetch<any[]>(`/api/payments/event/${encodeURIComponent(id)}`, { authToken: token });
byEv[id] = Array.isArray(list) ? list : [];
} catch (e) {
} catch {
byEv[id] = [];
}
}
@@ -257,7 +257,7 @@ export default function ReportsV2({ onBack }: { onBack?: () => void } = {}) {
try {
const list = await apiFetch<any[]>(`/api/registrations/event/${encodeURIComponent(id)}`, { authToken: token });
byEv[id] = Array.isArray(list) ? list : [];
} catch (e) {
} catch {
byEv[id] = [];
}
}
@@ -271,7 +271,7 @@ export default function ReportsV2({ onBack }: { onBack?: () => void } = {}) {
try {
const tickets = await apiFetch<any[]>(`/api/tickets/event/${encodeURIComponent(id)}`, { authToken: token });
result[id] = { used: tickets.filter(t => t.isUsed).length, unused: tickets.filter(t => !t.isUsed).length };
} catch (e) {
} catch {
result[id] = { used: 0, unused: 0 };
}
}
@@ -284,7 +284,7 @@ export default function ReportsV2({ onBack }: { onBack?: () => void } = {}) {
for (const id of eventIds) {
try {
byEv[id] = await apiFetch<any>(`/api/cashups/event/${encodeURIComponent(id)}`, { authToken: token });
} catch (e) {
} catch {
byEv[id] = null;
}
}
@@ -320,7 +320,7 @@ export default function ReportsV2({ onBack }: { onBack?: () => void } = {}) {
if (dateTo) query.set("to", dateTo);
try {
return await apiFetch<any[]>(`/api/coupons/redemptions?${query.toString()}`, { authToken: token });
} catch (e) {
} catch {
return [];
}
};
@@ -350,7 +350,7 @@ export default function ReportsV2({ onBack }: { onBack?: () => void } = {}) {
const idSet = new Set(eventIds);
const filtered = eventIds.length > 1 ? (rows || []).filter(r => idSet.has(r.eventId)) : (rows || []);
return computeAuditDeltas(filtered).sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime());
} catch (e) {
} catch {
return [];
}
};
@@ -2192,7 +2192,7 @@ export default function ReportsV2({ onBack }: { onBack?: () => void } = {}) {
</div>
</div>
<div className="text-xs text-gray-500 mb-2">
Every donation logged for these events, who gave it, and how much of it has been applied to an order (Used) versus still available (Unused). This is independent of the orders table above — a donation isn't tied to the donor's own order.
Every donation logged for these events, who gave it, and how much of it has been applied to an order (Used) versus still available (Unused). This is independent of the orders table above — a donation isn&apos;t tied to the donor&apos;s own order.
</div>
{donationsMadeRows.length === 0 ? (
<div className="text-sm text-gray-500">No donations logged for these events.</div>