style: fix no-empty — add comments to intentionally empty catch blocks
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user