chore(sqllab): Relocate get bootstrap data logic (#24936)

This commit is contained in:
JUST.in DO IT
2023-08-11 13:23:07 -07:00
committed by GitHub
parent ed0d288ccd
commit a44c99899a
8 changed files with 74 additions and 76 deletions

View File

@@ -570,15 +570,10 @@ export function addQueryEditor(queryEditor) {
export function addNewQueryEditor() {
return function (dispatch, getState) {
const {
sqlLab: {
queryEditors,
tabHistory,
unsavedQueryEditor,
defaultDbId,
databases,
},
sqlLab: { queryEditors, tabHistory, unsavedQueryEditor, databases },
common,
} = getState();
const defaultDbId = common.conf.SQLLAB_DEFAULT_DBID;
const activeQueryEditor = queryEditors.find(
qe => qe.id === tabHistory[tabHistory.length - 1],
);