chore: fix lint errors and reduce warnings across codebase (#234)
* chore: fix lint errors and reduce warnings across codebase - Fix noExplicitAny catches in backend routes and plugins - Fix noNestedTernary issues in backend services - Add keyboard event handlers for useKeyWithClickEvents in frontend - Disable noImportantStyles rule in biome.json - Fix formatting errors across all changed files - Fix test file lint issues Closes #233 * fix: restore any types in test files for TS compatibility * fix: revert Auth.tsx dependency array changes that caused infinite re-render * fix: null-safe user.username access in AppContext dependency array
This commit is contained in:
@@ -1892,11 +1892,8 @@ function groupEventsIntoPastDays(
|
||||
const medMap = dayMap.get(dateKey)!;
|
||||
if (!medMap.has(event.medName)) medMap.set(event.medName, []);
|
||||
// Mirror AppContext normalization: string|null → string[]
|
||||
const takenBy = Array.isArray(event.takenBy)
|
||||
? event.takenBy
|
||||
: typeof event.takenBy === "string"
|
||||
? [event.takenBy]
|
||||
: [];
|
||||
const singleOrEmpty = typeof event.takenBy === "string" ? [event.takenBy] : [];
|
||||
const takenBy = Array.isArray(event.takenBy) ? event.takenBy : singleOrEmpty;
|
||||
medMap.get(event.medName)!.push({ id: event.id, takenBy });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user