fix(plugin-tools-panel): CB-2286 Save active tool tab after page refresh

This commit is contained in:
Konstantin Vasilev
2022-08-08 10:31:48 +03:00
parent 6474b427ff
commit 2e59c87afd
@@ -63,10 +63,10 @@ interface IToolsState {
}
export const ToolsPanel = observer<Props>(function ToolsPanel({ container }) {
const prevTabs = useRef<string[]>([]);
const state = useUserData<IToolsState>('tools', () => ({ selectedTabId: null }));
const tabStyle = [BASE_TAB_STYLES, tabsStyles, UNDERLINE_TAB_STYLES];
const tabs = container.getIdList();
const prevTabs = useRef<string[]>(tabs);
const equal = isArraysEqual(prevTabs.current, tabs);
untracked(action(() => {