style: fix no-empty — add comments to intentionally empty catch blocks

This commit is contained in:
2026-06-25 14:33:44 +01:00
parent 7abacbc2b4
commit 63e9b32720
2 changed files with 6 additions and 2 deletions
@@ -168,7 +168,9 @@
const data = await bmRes.json(); const data = await bmRes.json();
bookingsMade = (data.bookings || []).length; bookingsMade = (data.bookings || []).length;
} }
} catch {} } catch {
// Non-critical — bookings-made fetch is optional for stats
}
const newStats: Stats = { const newStats: Stats = {
total, total,
+3 -1
View File
@@ -168,7 +168,9 @@
if (payload.role === 'admin') { if (payload.role === 'admin') {
redirectTo = '/today'; redirectTo = '/today';
} }
} catch {} } catch {
// Token decode failure is non-fatal; default redirectTo = '/' is used
}
toast.success('Successfully logged in!', { id: loadingToast }); toast.success('Successfully logged in!', { id: loadingToast });
window.location.href = redirectTo; window.location.href = redirectTo;
} else if (response.status === 409) { } else if (response.status === 409) {