mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-11-01 07:02:53 +00:00
Merge 34b0b3db59 into 570ed22b6c
This commit is contained in:
commit
fd08079ee4
1 changed files with 5 additions and 1 deletions
|
|
@ -92,8 +92,12 @@ export function HighlightsCard({
|
|||
if (isReplyOpen) replyInputRef.current?.focus()
|
||||
}, [isReplyOpen])
|
||||
|
||||
// biome-ignore lint/correctness/useExhaustiveDependencies: intentionally re-run when items changes
|
||||
useEffect(() => {
|
||||
// The Daily Brief refreshes on its own every few hours, so items can be
|
||||
// replaced with a shorter list while the user is on a later page. Pull the
|
||||
// active index back into range, otherwise currentItem is undefined and the
|
||||
// card falls through to the empty state even though highlights exist.
|
||||
setActiveIndex((i) => Math.min(i, Math.max(items.length - 1, 0)))
|
||||
setIsReplyOpen(false)
|
||||
setReplyText("")
|
||||
setIsExpanded(false)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue