mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 02:25:59 +00:00
prettier
This commit is contained in:
@@ -27,16 +27,16 @@ export default function MarkdownEditorTab({ tabid, tabVisible, toolbarPortalRef,
|
||||
|
||||
const showPreview = async () => {
|
||||
await saveToStorage();
|
||||
const existing = (openedTabs || []).find((x) => x.props && x.props.sourceTabId == tabid && x.closedTime == null);
|
||||
const existing = (openedTabs || []).find(x => x.props && x.props.sourceTabId == tabid && x.closedTime == null);
|
||||
if (existing) {
|
||||
setOpenedTabs((tabs) =>
|
||||
tabs.map((x) => ({
|
||||
setOpenedTabs(tabs =>
|
||||
tabs.map(x => ({
|
||||
...x,
|
||||
selected: x.tabid == existing.tabid,
|
||||
}))
|
||||
);
|
||||
} else {
|
||||
const thisTab = (openedTabs || []).find((x) => x.tabid == tabid);
|
||||
const thisTab = (openedTabs || []).find(x => x.tabid == tabid);
|
||||
openNewTab({
|
||||
title: thisTab.title,
|
||||
icon: 'img preview',
|
||||
|
||||
Reference in New Issue
Block a user