From 788095acba3cdfda73b03dca62ac1b0331f01456 Mon Sep 17 00:00:00 2001 From: Kentaro Suzuki <33363411+kentaro84207@users.noreply.github.com> Date: Tue, 21 Jul 2020 03:46:45 +0900 Subject: [PATCH] console: fix import metadata button text (close #5386) (#5415) --- console/src/components/Services/RemoteSchema/graphqlUtils.js | 2 +- .../Services/Settings/MetadataOptions/ImportMetadata.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/console/src/components/Services/RemoteSchema/graphqlUtils.js b/console/src/components/Services/RemoteSchema/graphqlUtils.js index 94e9ca76562..95387c8858d 100644 --- a/console/src/components/Services/RemoteSchema/graphqlUtils.js +++ b/console/src/components/Services/RemoteSchema/graphqlUtils.js @@ -69,7 +69,7 @@ export const useIntrospectionSchemaRemote = ( }); }; - useEffect(introspectSchema, [remoteSchemaName, dispatch, headers]); + useEffect(introspectSchema, [remoteSchemaName, dispatch]); return { schema, diff --git a/console/src/components/Services/Settings/MetadataOptions/ImportMetadata.js b/console/src/components/Services/Settings/MetadataOptions/ImportMetadata.js index 7126435e34c..ccbc4fed27a 100644 --- a/console/src/components/Services/Settings/MetadataOptions/ImportMetadata.js +++ b/console/src/components/Services/Settings/MetadataOptions/ImportMetadata.js @@ -27,6 +27,8 @@ class ImportMetadata extends Component { this.setState({ isImporting: false }); }; + this.setState({ isImporting: true }); + dispatch(replaceMetadataFromFile(fileContent, successCb, errorCb)); } @@ -38,8 +40,6 @@ class ImportMetadata extends Component { const handleImport = e => { e.preventDefault(); - this.setState({ isImporting: true }); - uploadFile(this.importMetadata, 'json'); };