Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
docs: rewrite comment for clarity
  • Loading branch information
Parkreiner committed Jul 2, 2024
commit edd6569b8d4f571343dc7424d5b2ec34808fb237
7 changes: 4 additions & 3 deletions site/src/modules/resources/AgentLogs/useAgentLogs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ export function useAgentLogs(

// One pitfall with the current approach: the enabled property does NOT
// prevent the useQuery call above from eventually having data. All it does
// is prevent it from getting data on its own. If a different useQuery call
// elsewhere in the app is enabled and gets data, the useQuery call here will
// re-render with that same new data, even if it's disabled. This can EASILY
// is prevent it from getting data on its own. Let's say a different useQuery
// call elsewhere in the app has the same query key and is enabled. When it
// gets data back from the server, the useQuery call here will re-render with
// that same new data, even though this state is "disabled". This can EASILY
// cause bugs.
const logs = enabled ? query.data : undefined;

Expand Down