diff --git a/src/external/bot-skeleton/utils/local-storage.js b/src/external/bot-skeleton/utils/local-storage.js index 0273052d..5705e803 100644 --- a/src/external/bot-skeleton/utils/local-storage.js +++ b/src/external/bot-skeleton/utils/local-storage.js @@ -1,7 +1,9 @@ import localForage from 'localforage'; import LZString from 'lz-string'; +import { config } from '../constants'; import { save_types } from '../constants/save-type'; import DBotStore from '../scratch/dbot-store'; + /** * Save workspace to localStorage * @param {String} save_type // constants/save_types.js (unsaved, local, googledrive) @@ -31,7 +33,7 @@ export const saveWorkspaceToRecent = async (xml, save_type = save_types.UNSAVED) workspaces.push({ id: workspace_id, timestamp: current_timestamp, - name: save_modal.bot_name, + name: config().default_file_name, xml: current_xml, save_type, }); diff --git a/src/pages/dashboard/load-bot-preview/recent-workspace.tsx b/src/pages/dashboard/load-bot-preview/recent-workspace.tsx index c21c3eaf..5dae05c3 100644 --- a/src/pages/dashboard/load-bot-preview/recent-workspace.tsx +++ b/src/pages/dashboard/load-bot-preview/recent-workspace.tsx @@ -2,6 +2,7 @@ import React from 'react'; import classnames from 'classnames'; import { observer } from 'mobx-react-lite'; import { getRecentFileIcon } from '@/components/load-modal/recent-workspace'; +import Popover from '@/components/shared_ui/popover'; import Text from '@/components/shared_ui/text'; import { DBOT_TABS } from '@/constants/bot-contents'; import { timeSince } from '@/external/bot-skeleton'; @@ -166,7 +167,9 @@ const RecentWorkspace = observer(({ workspace, index }: TRecentWorkspace) => { viewRecentStrategy(item.type); }} > - {item.icon} + + {item.icon} + ))} diff --git a/src/pages/tutorials/faq-content/index.tsx b/src/pages/tutorials/faq-content/index.tsx index 4d4868d3..29281762 100644 --- a/src/pages/tutorials/faq-content/index.tsx +++ b/src/pages/tutorials/faq-content/index.tsx @@ -81,7 +81,10 @@ const FAQContent = ({ faq_list, handleTabChange }: TFAQContent) => { const previous_sibling_element = open_accordion_element?.previousElementSibling as HTMLElement; if (faq_wrapper_element.current && open_accordion_element) { const offset = previous_sibling_element ? previous_sibling_element.offsetTop - 80 : 0; - scrollToElement(faq_wrapper_element?.current, offset); + const desktop_scroll_element = document.querySelector('.dc-tabs__content--tutorials') as HTMLElement; + const mobile_scroll_element = document.querySelector('.tutorials-mobile__faq') as HTMLElement; + const scroll_element = isDesktop ? desktop_scroll_element : mobile_scroll_element; + scrollToElement(scroll_element, offset); } if (timer_id?.current) clearTimeout(timer_id.current); }, 5);