feat: add charity reporting & financial breakdowns in admin, fix mobile scroll restoration and OTP numeric keyboard
Deploy Canina / deploy (push) Successful in 1m44s

This commit is contained in:
parsa committed 2026-08-26 00:12:33 +03:30
1 parent 7b89e141c5
commit cf9ae234b9
230 files changed
+266394 -123714

No files matched your search

+28
View File
@@ -50,8 +50,36 @@ export default function ClientLayout({ children }: { children: React.ReactNode }
} else {
useUserStore.getState().logout();
}
// Preserve scroll restoration on back/forward
if (typeof window !== 'undefined' && 'scrollRestoration' in window.history) {
window.history.scrollRestoration = 'auto';
}
}, [fetchProfile, fetchSettings]);
// Handle scroll position tracking per pathname for reliable mobile back navigation
useEffect(() => {
if (typeof window === 'undefined') return;
const key = `scroll_pos_${pathname}`;
const savedPos = sessionStorage.getItem(key);
if (savedPos !== null) {
const targetY = parseInt(savedPos, 10);
requestAnimationFrame(() => {
window.scrollTo({ top: targetY, behavior: 'instant' });
});
}
const handleScroll = () => {
sessionStorage.setItem(`scroll_pos_${pathname}`, window.scrollY.toString());
};
window.addEventListener('scroll', handleScroll, { passive: true });
return () => {
window.removeEventListener('scroll', handleScroll);
};
}, [pathname]);
// Check Maintenance Mode (Admin / Partner bypass)
const isMaintenanceMode = getText('MAINTENANCE_MODE', 'false') === 'true' || getText('maintenance_mode', 'false') === 'true';
const isAdmin = role === 'User_Partner' || (typeof window !== 'undefined' && Boolean(localStorage.getItem('adminToken')));