Skip to content

Commit

Permalink
fix: prettier format
Browse files Browse the repository at this point in the history
prettier format
  • Loading branch information
zhangtengjin committed Dec 23, 2020
1 parent ff83501 commit ed3065d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@
"path": "cz-conventional-changelog"
}
}
}
}
2 changes: 1 addition & 1 deletion src/extensions/explore/folderContextMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const getFolderDefaultContextMenu = (
onOk() {
deleteFile && deleteFile(activeData);
},
onCancel() { },
onCancel() {},
});
};
const commContextMenu = [
Expand Down
20 changes: 15 additions & 5 deletions src/extensions/explore/folderTree.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import * as React from 'react';
import { memo, useRef, useEffect, useState } from 'react';
import { editorService, explorerService } from 'mo';
import Tree, { ITreeNodeItem, ITreeProps, FileType, generateTreeId } from 'mo/components/tree';
import Tree, {
ITreeNodeItem,
ITreeProps,
FileType,
generateTreeId,
} from 'mo/components/tree';
import { IMenuItem, Menu } from 'mo/components/menu';
import { useContextMenu } from 'mo/components/contextMenu';
import { select } from 'mo/common/dom';
Expand Down Expand Up @@ -60,7 +65,12 @@ const FolderTree: React.FunctionComponent<ITreeProps> = (props: ITreeProps) => {
useEffect(() => {
const { contextMenu, id, fileType } = activeData;
const moContextMenu: IMenuItem[] | undefined =
contextMenu || getFolderDefaultContextMenu?.(fileType, activeData, Object.assign({}, serviceProps, { onFocus }));
contextMenu ||
getFolderDefaultContextMenu?.(
fileType,
activeData,
Object.assign({}, serviceProps, { onFocus })
);
let contextViewMenu;
if (moContextMenu && moContextMenu.length > 0) {
contextViewMenu = useContextMenu({
Expand Down Expand Up @@ -97,11 +107,11 @@ const FolderTree: React.FunctionComponent<ITreeProps> = (props: ITreeProps) => {
index
);
}}
onChange={(e) => { }}
onChange={(e) => {}}
/>
) : (
name
);
name
);
}}
{...restProps}
/>
Expand Down
6 changes: 3 additions & 3 deletions src/extensions/search/searchPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { activityBarService, editorService, explorerService } from 'mo';
import { Button } from 'mo/components/button';
import SearchTree from './searchTree';

interface ISearchPaneToolBar { }
interface ISearchPaneToolBar {}

const initialState = {
input: '',
Expand Down Expand Up @@ -38,7 +38,7 @@ type State = typeof initialState;
export default class SearchPane extends React.Component<
ISearchPaneToolBar,
State
> {
> {
state: State;

constructor(props) {
Expand Down Expand Up @@ -94,7 +94,7 @@ export default class SearchPane extends React.Component<
editorService.open(tabData, 1);
};

const openCommand = function () { };
const openCommand = function () {};
const { input } = this.state;
return (
<div className={prefixClaName('search-pane', 'sidebar')}>
Expand Down
4 changes: 2 additions & 2 deletions src/extensions/search/searchTree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ const SearchTree: React.FunctionComponent<SearchTreeProps> = (
{afterStr}
</span>
) : (
name
);
name
);
return title;
}}
onSelectFile={serviceProps.onSelectFile}
Expand Down

0 comments on commit ed3065d

Please sign in to comment.