Improve calendar view and add scheduling conflict warnings

Enhance the calendar list view to prioritize today's date and introduce visual indicators for optimal posting times and existing scheduled posts on the new post page.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/VJoXNjs
This commit is contained in:
michaelschal committed 2025-10-28 12:43:14 +00:00
1 parent 44ec6abe00
commit eec5e397fe
3 files changed
+90 -4

No files matched your search

+9 -2
View File
@@ -42,8 +42,15 @@ export default function CalendarListView({ scheduledPosts, onEditPost, onDeleteP
return acc;
}, {});
// Sort dates
const sortedDates = Object.keys(groupedPosts).sort();
// Sort dates - put today first, then chronological order
const today = format(new Date(), "yyyy-MM-dd");
const sortedDates = Object.keys(groupedPosts).sort((a, b) => {
// Today always comes first
if (a === today && b !== today) return -1;
if (b === today && a !== today) return 1;
// Otherwise chronological order
return a.localeCompare(b);
});
const toggleDate = (date: string) => {
const newExpanded = new Set(expandedDates);