Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed unnecessary console logs #159

Merged
merged 3 commits into from
Oct 31, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
format fix
abrulic1 committed Oct 31, 2024
commit e59d174751b0898119c6a252c22fd6efbb53dd80
10 changes: 5 additions & 5 deletions src/client/hooks/useDevServerConnection.ts
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ const updateRouteInfo = (
const { data, type } = event
const { id, ...rest } = data
// Get existing route
const existingRouteInfo = !includeServerInfo ? routes?.[id] : routes?.[id] ?? server?.routes?.[id]
const existingRouteInfo = !includeServerInfo ? routes?.[id] : (routes?.[id] ?? server?.routes?.[id])
let newRouteData = [...(existingRouteInfo?.[type === "loader" ? "loaders" : "actions"] || []), rest]
// Makes sure there are no more than 20 entries per loader/action
newRouteData = cutArrayToLastN(newRouteData, 20)
@@ -40,10 +40,10 @@ const updateRouteInfo = (
highestExecutionTime: max,
averageExecutionTime: Number(Number(total / newRouteData.length).toFixed(2)),
loaderTriggerCount: type === "loader" ? loaderTriggerCount + 1 : loaderTriggerCount,
loaders: type === "loader" ? newRouteData : existingRouteInfo?.loaders ?? [],
actions: type === "action" ? newRouteData : existingRouteInfo?.actions ?? [],
lastLoader: type === "loader" ? rest : existingRouteInfo?.lastLoader ?? {},
lastAction: type === "action" ? rest : existingRouteInfo?.lastAction ?? {},
loaders: type === "loader" ? newRouteData : (existingRouteInfo?.loaders ?? []),
actions: type === "action" ? newRouteData : (existingRouteInfo?.actions ?? []),
lastLoader: type === "loader" ? rest : (existingRouteInfo?.lastLoader ?? {}),
lastAction: type === "action" ? rest : (existingRouteInfo?.lastAction ?? {}),
actionTriggerCount: type === "action" ? actionTriggerCount + 1 : actionTriggerCount,
}
}