Use RFM summaries for clients list
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m31s

This commit is contained in:
Cauê Faleiros
2026-06-12 14:36:22 -03:00
parent ba27a342f8
commit 68a79838a2
2 changed files with 28 additions and 33 deletions

View File

@@ -6,7 +6,8 @@ import { fetchData, fetchStock, logout } from '../dataService';
const Layout = () => {
const location = useLocation();
const needsRawData = location.pathname.startsWith('/products') || location.pathname.startsWith('/clients');
const needsRawData = location.pathname.startsWith('/products') ||
(location.pathname.startsWith('/clients/') && location.pathname !== '/clients');
const [isSidebarCollapsed, setIsSidebarCollapsed] = useState(() => {
return localStorage.getItem('graph_sidebar_collapsed') === 'true';
});
@@ -47,7 +48,7 @@ const Layout = () => {
useEffect(() => {
if (!needsRawData) return;
// Product and client pages still depend on raw orders until their API migration is complete.
// Product pages and client details still depend on raw orders until their API migration is complete.
// eslint-disable-next-line react-hooks/set-state-in-effect
void loadData(true);
}, [loadData, needsRawData]);