Fixed Resources, Added Error Logging/Messages, Fixed Pumkin Spice Background
Build & Auto-Repair / build (push) Has been cancelled
Build & Auto-Repair / build (push) Has been cancelled
This commit is contained in:
@@ -126,11 +126,11 @@ export default function CalendarPage() {
|
||||
fetch("/api/event-users")
|
||||
.then((r) => r.json())
|
||||
.then((data) => setUsers(data.users || []))
|
||||
.catch(() => {})
|
||||
.catch((err) => console.error("Failed to fetch event users:", err))
|
||||
fetch("/api/leads?limit=200")
|
||||
.then((r) => r.json())
|
||||
.then((data) => setLeads((Array.isArray(data) ? data : data?.leads || []).map((l: any) => ({ id: l.id, contactName: l.contactName, companyName: l.companyName }))))
|
||||
.catch(() => {})
|
||||
.catch((err) => console.error("Failed to fetch leads:", err))
|
||||
}, [user, router])
|
||||
|
||||
useEffect(() => {
|
||||
@@ -139,13 +139,13 @@ export default function CalendarPage() {
|
||||
}, [fetchMonthEvents])
|
||||
|
||||
useEffect(() => {
|
||||
fetchUpcomingEvents().catch(() => {})
|
||||
fetchUpcomingEvents().catch((err) => console.error("Failed to fetch upcoming events:", err))
|
||||
}, [fetchUpcomingEvents])
|
||||
|
||||
useEffect(() => {
|
||||
const interval = setInterval(() => {
|
||||
fetchMonthEvents().catch(() => {})
|
||||
fetchUpcomingEvents().catch(() => {})
|
||||
fetchMonthEvents().catch((err) => console.error("Failed to fetch month events:", err))
|
||||
fetchUpcomingEvents().catch((err) => console.error("Failed to fetch upcoming events:", err))
|
||||
}, 15000)
|
||||
return () => clearInterval(interval)
|
||||
}, [fetchMonthEvents, fetchUpcomingEvents])
|
||||
|
||||
Reference in New Issue
Block a user