Skip to content

Commit d6dc9f7

Browse files
fix(ui): fix flash between home and new chat (#4143)
Co-authored-by: Theodore Li <theo@sim.ai>
1 parent 6587afb commit d6dc9f7

File tree

1 file changed

+5
-3
lines changed
  • apps/sim/app/workspace/[workspaceId]/home/hooks

1 file changed

+5
-3
lines changed

apps/sim/app/workspace/[workspaceId]/home/hooks/use-chat.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,9 +1601,11 @@ export function useChat(
16011601
})
16021602
}
16031603
if (!workflowIdRef.current) {
1604-
router.replace(`/workspace/${workspaceId}/task/${payloadChatId}`, {
1605-
scroll: false,
1606-
})
1604+
window.history.replaceState(
1605+
null,
1606+
'',
1607+
`/workspace/${workspaceId}/task/${payloadChatId}`
1608+
)
16071609
}
16081610
}
16091611
}

0 commit comments

Comments
 (0)