mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-14 09:25:58 +08:00
fix: [3958]: restrict dashboard api call on other pages (#4066)
This commit is contained in:
parent
1e4cf2513c
commit
e18bb7d5bc
@ -185,7 +185,12 @@ export function DashboardProvider({
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (isVisible && updatedTimeRef.current) {
|
||||
// make the call on tab visibility only if the user is on dashboard / widget page
|
||||
if (
|
||||
isVisible &&
|
||||
updatedTimeRef.current &&
|
||||
(!!isDashboardPage || !!isDashboardWidgetPage)
|
||||
) {
|
||||
dashboardResponse.refetch();
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
|
Loading…
x
Reference in New Issue
Block a user