diff --git a/packages/bot-web-ui/src/components/dashboard/dashboard-component/load-bot-preview/google-drive.tsx b/packages/bot-web-ui/src/components/dashboard/dashboard-component/load-bot-preview/google-drive.tsx index 3539d2e26623..672ae2b017e1 100644 --- a/packages/bot-web-ui/src/components/dashboard/dashboard-component/load-bot-preview/google-drive.tsx +++ b/packages/bot-web-ui/src/components/dashboard/dashboard-component/load-bot-preview/google-drive.tsx @@ -7,9 +7,10 @@ import { Localize, localize } from '@deriv/translations'; import { useDBotStore } from 'Stores/useDBotStore'; const GoogleDrive = observer(() => { - const { google_drive, load_modal } = useDBotStore(); + const { google_drive, load_modal, dashboard } = useDBotStore(); const { is_authorised } = google_drive; const { is_open_button_loading, onDriveConnect, onDriveOpen } = load_modal; + const { setOpenSettings } = dashboard; return (
@@ -35,6 +36,7 @@ const GoogleDrive = observer(() => { text={localize('Open')} onClick={() => { onDriveOpen(); + setOpenSettings('import'); }} is_loading={is_open_button_loading} has_effect diff --git a/packages/bot-web-ui/src/stores/google-drive-store.js b/packages/bot-web-ui/src/stores/google-drive-store.js index abb175fb2d58..b1a6ea018946 100644 --- a/packages/bot-web-ui/src/stores/google-drive-store.js +++ b/packages/bot-web-ui/src/stores/google-drive-store.js @@ -202,7 +202,6 @@ export default class GoogleDriveStore { const file_name = file.name; const fileId = file.id; const { files } = gapi.client.drive; - const { setOpenSettings } = this.root_store.dashboard; const response = await files.get({ alt: 'media', @@ -211,7 +210,6 @@ export default class GoogleDriveStore { }); resolve({ xml_doc: response.body, file_name }); - setOpenSettings('import'); } };