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
@@ -179,7 +179,7 @@ function CostsTab({ eventId, token, costs, eventOptions, isClosed, onChanged }:
)}
</div>
{isClosed && <div className="text-xs text-gray-500">This event is closed — costs can't be changed until it's reopened.</div>}
{isClosed && <div className="text-xs text-gray-500">This event is closed — costs can&apos;t be changed until it&apos;s reopened.</div>}
<div className="overflow-auto">
<table className="w-full text-sm min-w-[600px]">
@@ -261,7 +261,7 @@ function CostsTab({ eventId, token, costs, eventOptions, isClosed, onChanged }:
<option value="">Not from event takings</option>
{METHODS.map(m => <option key={m} value={m}>{METHOD_LABELS[m]}</option>)}
</select>
<p className="text-[10px] text-gray-400 mt-0.5">If this was paid out of the door takings (e.g. cash to a vendor), tag it so the Cashup report deducts it from that method's expected amount.</p>
<p className="text-[10px] text-gray-400 mt-0.5">If this was paid out of the door takings (e.g. cash to a vendor), tag it so the Cashup report deducts it from that method&apos;s expected amount.</p>
</div>
<div className="col-span-2">
<label className="block text-xs text-gray-600 mb-1">Notes (optional)</label>
@@ -761,7 +761,7 @@ function ReconciliationTab({ eventId, token, data, busy, setBusy, setError, onCh
</tbody>
</table>
{!isClosed && (
<div className="text-xs text-gray-500">Cash actual is the live sum of per-staff-member counts entered below — there's no separate event-wide entry.</div>
<div className="text-xs text-gray-500">Cash actual is the live sum of per-staff-member counts entered below — there&apos;s no separate event-wide entry.</div>
)}
</div>
@@ -84,7 +84,7 @@ export default function AdminDashboardPage() {
]);
setPaymentStats(dash.paymentStats);
setOverview(overviewData);
} catch (e) {
} catch {
// ignore errors for dashboard summaries
} finally {
hasLoadedOnce.current = true;
@@ -875,7 +875,7 @@ function WhatsAppTab({ active }: { active: boolean }) {
const res = await apiFetch<StatusResponse>("/api/whatsapp/status", { authToken: token });
setStatus(res.status ?? null);
setStatusMsg(res.message ?? null);
} catch (e: any) {
} catch {
await fetchConfig();
setStatus("FAILED");
setStatusMsg(null);
@@ -27,15 +27,6 @@ type Role = typeof roleOptions[number];
const notificationPreferenceOptions = ["email", "whatsapp", "both"] as const;
// Simple fuzzy: tolerate one missing/swapped char by checking if query chars appear in order
function fuzzyMatch(query: string, target: string): boolean {
const q = query.toLowerCase();
const t = target.toLowerCase();
if (t.includes(q)) return true;
// token-based: all tokens must appear somewhere
const tokens = q.split(/\s+/).filter(Boolean);
return tokens.every(tok => t.includes(tok));
}
export default function AdminUsersPage() {
const { user, loading, token } = useAuth();