Skip to content

Commit ca0105a

Browse files
committed
ack PR comments
1 parent 9f98f59 commit ca0105a

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

apps/sim/app/workspace/[workspaceId]/logs/components/dashboard/dashboard.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,9 +371,7 @@ function DashboardInner({ stats, isLoading, error }: DashboardProps) {
371371
[toggleWorkflowId]
372372
)
373373

374-
useEffect(() => {
375-
lastAnchorIndicesRef.current = lastAnchorIndices
376-
}, [lastAnchorIndices])
374+
lastAnchorIndicesRef.current = lastAnchorIndices
377375

378376
/**
379377
* Handles segment click for selecting time segments.

apps/sim/app/workspace/[workspaceId]/logs/components/log-details/log-details.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,7 @@ const WorkflowOutputSection = memo(
234234
</div>
235235
)
236236
},
237-
(prev, next) =>
238-
prev.output === next.output || JSON.stringify(prev.output) === JSON.stringify(next.output)
237+
(prev, next) => prev.output === next.output
239238
)
240239

241240
interface LogDetailsProps {

apps/sim/app/workspace/[workspaceId]/logs/logs.tsx

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -230,13 +230,19 @@ export default function Logs() {
230230
useEffect(() => {
231231
selectedLogIdRef.current = selectedLogId
232232
}, [selectedLogId])
233-
logsRefetchRef.current = logsQuery.refetch
234-
activeLogRefetchRef.current = activeLogQuery.refetch
235-
logsQueryRef.current = {
236-
isFetching: logsQuery.isFetching,
237-
hasNextPage: logsQuery.hasNextPage ?? false,
238-
fetchNextPage: logsQuery.fetchNextPage,
239-
}
233+
useEffect(() => {
234+
logsRefetchRef.current = logsQuery.refetch
235+
}, [logsQuery.refetch])
236+
useEffect(() => {
237+
activeLogRefetchRef.current = activeLogQuery.refetch
238+
}, [activeLogQuery.refetch])
239+
useEffect(() => {
240+
logsQueryRef.current = {
241+
isFetching: logsQuery.isFetching,
242+
hasNextPage: logsQuery.hasNextPage ?? false,
243+
fetchNextPage: logsQuery.fetchNextPage,
244+
}
245+
}, [logsQuery.isFetching, logsQuery.hasNextPage, logsQuery.fetchNextPage])
240246

241247
useEffect(() => {
242248
const timers = refreshTimersRef.current

0 commit comments

Comments
 (0)