web: refresh notebooks after adding a new notebook

This commit is contained in:
Abdullah Atta
2023-12-27 10:13:59 +05:00
parent 599b33411a
commit 2788dbe960

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>