mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-25 19:40:24 +00:00
fix: frontend fixes
Signed-off-by: Shivanshu Raj Shrivastava <shivanshu1333@gmail.com>
This commit is contained in:
parent
00526e3803
commit
a62bf6fc60
@ -26,12 +26,17 @@ export function useFunnelMetrics({
|
||||
end_time: endTime,
|
||||
};
|
||||
|
||||
const {
|
||||
data: overviewData,
|
||||
isLoading,
|
||||
isFetching,
|
||||
isError,
|
||||
} = useFunnelOverview(funnelId, payload);
|
||||
// Always call both hooks to satisfy the rules of hooks
|
||||
const stepsOverviewResult = useFunnelStepsOverview(funnelId, payload);
|
||||
const overviewResult = useFunnelOverview(funnelId, payload);
|
||||
|
||||
// Select which result to use
|
||||
const queryResult =
|
||||
stepStart !== undefined && stepEnd !== undefined
|
||||
? stepsOverviewResult
|
||||
: overviewResult;
|
||||
|
||||
const { data: overviewData, isLoading, isFetching, isError } = queryResult;
|
||||
|
||||
const metricsData = useMemo(() => {
|
||||
const sourceData = overviewData?.payload?.data?.[0]?.data;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user