web: refresh notebooks after adding a new notebook

This commit is contained in:
Abdullah Atta
2023-12-27 10:13:59 +05:00
committed by Abdullah Atta
parent a32df1a009
commit 339e3444e7

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>