web: refresh notebooks after adding a new notebook

This commit is contained in:
Abdullah Atta
2023-12-27 10:13:59 +05:00
parent 7c6e79d78d
commit 0a01ef6357

View File

@@ -331,7 +331,13 @@ function MoveDialog({ onClose, noteIds }: MoveDialogProps) {
data-test-id="add-new-notebook"
variant="secondary"
sx={{ mt: 2 }}
onClick={() => showAddNotebookDialog()}
onClick={() =>
showAddNotebookDialog().then(() =>
rootNotebooks.status === "fulfilled"
? rootNotebooks.refresh()
: null
)
}
>
Add new notebook
</Button>