Revamp admin dashboard analytics and UI
Refactored the admin dashboard to use tabbed navigation for analytics and management. Enhanced AdminAnalytics with Recharts visualizations, added top vendors by revenue, and improved chart tooltips. Removed unused columns from vendor table. Updated layout and notification context to exclude admin pages from dashboard-specific UI and notifications. Minor debug logging added to SystemStatusCard.
This commit is contained in:
@@ -167,8 +167,8 @@ export function NotificationProvider({ children }: NotificationProviderProps) {
|
||||
|
||||
// Check for new paid orders
|
||||
useEffect(() => {
|
||||
// Only run this on dashboard pages
|
||||
if (typeof window === 'undefined' || !window.location.pathname.includes("/dashboard")) return;
|
||||
// Only run this on dashboard pages, but not on admin pages
|
||||
if (typeof window === 'undefined' || !window.location.pathname.includes("/dashboard") || window.location.pathname.includes("/dashboard/admin")) return;
|
||||
|
||||
const checkForNewOrders = async () => {
|
||||
try {
|
||||
@@ -250,8 +250,8 @@ export function NotificationProvider({ children }: NotificationProviderProps) {
|
||||
|
||||
// Fetch unread chat counts
|
||||
useEffect(() => {
|
||||
// Only run this on dashboard pages
|
||||
if (typeof window === 'undefined' || !window.location.pathname.includes("/dashboard")) return;
|
||||
// Only run this on dashboard pages, but not on admin pages
|
||||
if (typeof window === 'undefined' || !window.location.pathname.includes("/dashboard") || window.location.pathname.includes("/dashboard/admin")) return;
|
||||
|
||||
const fetchUnreadCounts = async () => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user