Refactor network service to use config objects for clarity
This commit is contained in:
1 parent
a8e069b820
commit
1c8376dc24
11 files changed
+325
-286
No files matched your search
@@ -44,15 +44,15 @@ const PageSpeedDetails = () => {
|
||||
useEffect(() => {
|
||||
const fetchMonitor = async () => {
|
||||
try {
|
||||
const res = await networkService.getStatsByMonitorId(
|
||||
authToken,
|
||||
monitorId,
|
||||
"desc",
|
||||
50,
|
||||
"day",
|
||||
null,
|
||||
null
|
||||
);
|
||||
const res = await networkService.getStatsByMonitorId({
|
||||
authToken: authToken,
|
||||
monitorId: monitorId,
|
||||
sortOrder: "desc",
|
||||
limit: 50,
|
||||
dateRange: "day",
|
||||
numToDisplay: null,
|
||||
normalize: null,
|
||||
});
|
||||
setMonitor(res?.data?.data ?? {});
|
||||
setAudits(res?.data?.data?.checks?.[0]?.audits ?? []);
|
||||
} catch (error) {
|
||||
|
||||
Reference in new issue
Block a user