console update
This commit is contained in:
@@ -423,7 +423,11 @@ export function useFiestaRiderPeriodicLogs(opts: {
|
||||
return useQuery({
|
||||
queryKey: fiestaKeys.riderPeriodicLogs(opts),
|
||||
queryFn: () => getRiderPeriodicLogs(opts),
|
||||
enabled: Boolean(opts.fromdate && opts.todate),
|
||||
// A rider is required. Without this guard the query fired on every page load
|
||||
// with no rider selected — and `riders/getriderperiodiclogs` 404s in both the
|
||||
// riders/ and partners/ namespaces (no such backend route exists), so every
|
||||
// load spent a request on a guaranteed failure.
|
||||
enabled: Boolean((opts.userid || opts.riderid) && opts.fromdate && opts.todate),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user