Fix formatting

This commit is contained in:
Rene Pfeuffer
2019-12-17 12:42:05 +01:00
parent 7da7a68817
commit f257a8eeb8
2 changed files with 19 additions and 15 deletions

View File

@@ -27,7 +27,7 @@ type Props = WithTranslation & {
type State = {
stoppableUpdateHandler?: number;
}
};
const FixedWidthTh = styled.th`
width: 16px;
@@ -46,7 +46,6 @@ export function findParent(path: string) {
}
class FileTree extends React.Component<Props, State> {
constructor(props: Props) {
super(props);
this.state = {};
@@ -54,10 +53,10 @@ class FileTree extends React.Component<Props, State> {
componentDidUpdate(prevProps: Readonly<Props>, prevState: Readonly<State>): void {
if (prevState.stoppableUpdateHandler === this.state.stoppableUpdateHandler) {
const {tree, updateSources} = this.props;
const { tree, updateSources } = this.props;
if (tree?._embedded?.children && tree._embedded.children.find(c => c.partialResult)) {
const stoppableUpdateHandler = setTimeout(updateSources, 3000);
this.setState({stoppableUpdateHandler: stoppableUpdateHandler});
this.setState({ stoppableUpdateHandler: stoppableUpdateHandler });
}
}
}
@@ -177,5 +176,8 @@ const mapStateToProps = (state: any, ownProps: Props) => {
export default compose(
withRouter,
connect(mapStateToProps, mapDispatchToProps)
connect(
mapStateToProps,
mapDispatchToProps
)
)(withTranslation("repos")(FileTree));