From 728f735be920609dfda04f87a0439af12f59505c Mon Sep 17 00:00:00 2001 From: akageun Date: Wed, 13 Nov 2024 23:15:23 +0900 Subject: [PATCH] modify js file --- .../webapp/src/components/cluster/query-editor.js | 3 ++- .../src/components/layout/cassdio-default-layout.js | 12 +++++++----- .../webapp/src/pages/cluster/cluster-query-page.js | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/cassdio-web/src/main/webapp/src/components/cluster/query-editor.js b/cassdio-web/src/main/webapp/src/components/cluster/query-editor.js index 763cf718..2cfadfd7 100644 --- a/cassdio-web/src/main/webapp/src/components/cluster/query-editor.js +++ b/cassdio-web/src/main/webapp/src/components/cluster/query-editor.js @@ -170,6 +170,7 @@ const QueryEditor = ({queryOptions, setQueryOptions, queryExecute}) => { + @@ -200,7 +201,7 @@ const QueryEditor = ({queryOptions, setQueryOptions, queryExecute}) => {
{ setQueryOptions(t => { diff --git a/cassdio-web/src/main/webapp/src/components/layout/cassdio-default-layout.js b/cassdio-web/src/main/webapp/src/components/layout/cassdio-default-layout.js index 80aa0187..25acc610 100644 --- a/cassdio-web/src/main/webapp/src/components/layout/cassdio-default-layout.js +++ b/cassdio-web/src/main/webapp/src/components/layout/cassdio-default-layout.js @@ -15,11 +15,13 @@ const CassdioDefaultLayout = ({}) => { useEffect(() => { - dispatch({ - type: "SET_BOOTSTRAP", - consistencyLevels: bootstrap.consistencyLevels, - defaultConsistencyLevel: bootstrap.defaultConsistencyLevel, - }); + if (bootstrap) { + dispatch({ + type: "SET_BOOTSTRAP", + consistencyLevels: bootstrap.consistencyLevels, + defaultConsistencyLevel: bootstrap.defaultConsistencyLevel, + }); + } return () => { }; diff --git a/cassdio-web/src/main/webapp/src/pages/cluster/cluster-query-page.js b/cassdio-web/src/main/webapp/src/pages/cluster/cluster-query-page.js index e7f04ac8..eedb52dd 100644 --- a/cassdio-web/src/main/webapp/src/pages/cluster/cluster-query-page.js +++ b/cassdio-web/src/main/webapp/src/pages/cluster/cluster-query-page.js @@ -1,4 +1,4 @@ -import {Link, useParams} from "react-router-dom"; +import {useParams} from "react-router-dom"; import React, {useEffect, useState} from "react"; import {toast} from "react-toastify"; import QueryEditor from "components/cluster/query-editor";