fix: immediately refresh notebooks context in UI after AI organization
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m24s
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m24s
This commit is contained in:
@@ -85,7 +85,7 @@ export function HomeClient({ initialNotes, initialSettings }: HomeClientProps) {
|
||||
notesRef.current = notes
|
||||
const { refreshKey, triggerRefresh } = useNoteRefresh()
|
||||
const { refreshNotes } = useRefresh()
|
||||
const { labels, notebooks } = useNotebooks()
|
||||
const { labels, notebooks, refreshNotebooks } = useNotebooks()
|
||||
const { setControls } = useEditorUI()
|
||||
|
||||
const { shouldSuggest: shouldSuggestLabels, notebookId: suggestNotebookId, dismiss: dismissLabelSuggestion } = useAutoLabelSuggestion()
|
||||
@@ -826,7 +826,11 @@ export function HomeClient({ initialNotes, initialSettings }: HomeClientProps) {
|
||||
onOpenChange={setOrganizeNotebookOpen}
|
||||
notebookId={currentNotebook.id}
|
||||
notebookName={currentNotebook.name}
|
||||
onDone={() => router.refresh()}
|
||||
onDone={() => {
|
||||
refreshNotebooks()
|
||||
triggerRefresh()
|
||||
router.refresh()
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user