mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-16 03:39:15 +02:00
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:
1 parent
44ec6abe00
commit
eec5e397fe
3 files changed
+90
-4
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user