Fix the mechanical style rules. [skip build]
This commit is contained in:
1 parent
831ce01150
commit
9591d8d01b
42 files changed
+762
-756
No files matched your search
@@ -238,7 +238,7 @@ const formatDayLabel = (ts: number): string => {
|
||||
const groupMediaByMonthAndDay = (items: RoomMediaItem[]): MediaMonthGroup[] => {
|
||||
const months: MediaMonthGroup[] = [];
|
||||
|
||||
for (const item of items) {
|
||||
items.forEach((item) => {
|
||||
const date = new Date(item.ts);
|
||||
const monthKey = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}`;
|
||||
const dayKey = `${monthKey}-${String(date.getDate()).padStart(2, '0')}`;
|
||||
@@ -264,7 +264,7 @@ const groupMediaByMonthAndDay = (items: RoomMediaItem[]): MediaMonthGroup[] => {
|
||||
}
|
||||
|
||||
day.items.push(item);
|
||||
}
|
||||
});
|
||||
|
||||
return months;
|
||||
};
|
||||
@@ -295,9 +295,9 @@ export const MediaDrawer = as<'div', MediaDrawerProps>(
|
||||
|
||||
const senders = useMemo<MediaSenderChip[]>(() => {
|
||||
const counts = new Map<string, number>();
|
||||
for (const item of items) {
|
||||
items.forEach((item) => {
|
||||
counts.set(item.sender, (counts.get(item.sender) ?? 0) + 1);
|
||||
}
|
||||
});
|
||||
|
||||
return Array.from(counts.entries())
|
||||
.map(([userId, count]) => ({
|
||||
|
||||
Reference in new issue
Block a user