mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-04 18:52:56 +00:00
hot fix #1
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
// Quick debug to check if AdminScrollManager is working
|
||||
// Run this in browser console
|
||||
|
||||
(function debugAdminScrollManager() {
|
||||
console.clear();
|
||||
console.log('=== DEBUGGING AdminScrollManager ===\n');
|
||||
|
||||
// Check if AdminScrollManager is loaded
|
||||
console.log('🔍 Checking AdminScrollManager...');
|
||||
|
||||
// Look for AdminScrollManager logs
|
||||
console.log('📋 Recent console logs:');
|
||||
const logs = console.logs || [];
|
||||
console.log(' - Look for "[AdminScrollManager] Component mounted" message');
|
||||
console.log(' - Look for "[AdminScrollManager] Saved position" message');
|
||||
console.log(' - Look for "[AdminScrollManager] Restoring position" message');
|
||||
|
||||
// Check if AdminLayout is being used
|
||||
const adminLayout = document.querySelector('.admin-layout');
|
||||
console.log('\n🏗️ AdminLayout check:');
|
||||
console.log(' AdminLayout element found:', !!adminLayout);
|
||||
|
||||
// Check sidebar
|
||||
const sidebar = document.querySelector('[data-sidebar="true"]');
|
||||
console.log('\n📱 Sidebar check:');
|
||||
console.log(' Sidebar element found:', !!sidebar);
|
||||
console.log(' Sidebar current scroll:', sidebar?.scrollTop);
|
||||
|
||||
// Check if React DevTools shows AdminScrollManager
|
||||
console.log('\n🔧 Manual test:');
|
||||
console.log(' 1. Scroll the sidebar to any position');
|
||||
console.log(' 2. Click an admin navigation link');
|
||||
console.log(' 3. Watch console for AdminScrollManager messages');
|
||||
|
||||
console.log('\n💡 If you don\'t see AdminScrollManager logs, the component is not loading');
|
||||
|
||||
// Force a test
|
||||
if (sidebar) {
|
||||
console.log('\n🧪 Forcing a scroll test...');
|
||||
sidebar.scrollTop = 300;
|
||||
setTimeout(() => {
|
||||
console.log(' Scroll set to:', sidebar.scrollTop);
|
||||
console.log(' Now click a navigation link and watch for AdminScrollManager logs');
|
||||
}, 100);
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user