Optimize client details with opaque tokens
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m20s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m20s
This commit is contained in:
@@ -7,8 +7,7 @@ import { rangeForLastDays } from '../dateRanges';
|
||||
|
||||
const Layout = () => {
|
||||
const location = useLocation();
|
||||
const needsRawData = location.pathname.startsWith('/products') ||
|
||||
(location.pathname.startsWith('/clients/') && location.pathname !== '/clients');
|
||||
const needsRawData = location.pathname.startsWith('/products');
|
||||
const [isSidebarCollapsed, setIsSidebarCollapsed] = useState(() => {
|
||||
return localStorage.getItem('graph_sidebar_collapsed') === 'true';
|
||||
});
|
||||
@@ -46,7 +45,7 @@ const Layout = () => {
|
||||
useEffect(() => {
|
||||
if (!needsRawData) return;
|
||||
|
||||
// Product pages and client details still depend on raw orders until their API migration is complete.
|
||||
// Product pages 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