You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@age.apache.org by ak...@apache.org on 2023/01/27 21:20:55 UTC

[age-viewer] branch main updated: view new graphs metadata when initialized (#109)

This is an automated email from the ASF dual-hosted git repository.

ako pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/age-viewer.git


The following commit(s) were added to refs/heads/main by this push:
     new 40eebff  view new graphs metadata when initialized (#109)
40eebff is described below

commit 40eebffd543c766a23696944045b3823a4b90fdf
Author: marodins <67...@users.noreply.github.com>
AuthorDate: Fri Jan 27 13:20:49 2023 -0800

    view new graphs metadata when initialized (#109)
---
 .../src/components/initializer/presentation/GraphInitializer.jsx   | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/frontend/src/components/initializer/presentation/GraphInitializer.jsx b/frontend/src/components/initializer/presentation/GraphInitializer.jsx
index f990526..69ecf2d 100644
--- a/frontend/src/components/initializer/presentation/GraphInitializer.jsx
+++ b/frontend/src/components/initializer/presentation/GraphInitializer.jsx
@@ -101,9 +101,10 @@ const InitGraphModal = ({ show, setShow }) => {
         } else {
           setShow(false);
           dispatch(addAlert('CreateGraphSuccess'));
-          getMetaData();
-          changeCurrentGraph({ name: graphName });
-          changeGraph(graphName);
+          dispatch(getMetaData()).then(() => {
+            dispatch(changeCurrentGraph({ name: graphName }));
+            dispatch(changeGraph({ graphName }));
+          });
         }
       })
       .catch((err) => {