Use RFM summaries for clients list
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m31s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m31s
This commit is contained in:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user