mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 00:15:44 +01:00
fix Diff ui types
This commit is contained in:
@@ -6,14 +6,14 @@ import parser from "gitdiff-parser";
|
||||
|
||||
import Loading from "../Loading";
|
||||
import Diff from "./Diff";
|
||||
import type {DiffObjectProps} from "./DiffTypes";
|
||||
import type {DiffObjectProps, File} from "./DiffTypes";
|
||||
|
||||
type Props = DiffObjectProps & {
|
||||
url: string
|
||||
};
|
||||
|
||||
type State = {
|
||||
diff?: any,
|
||||
diff?: File[],
|
||||
loading: boolean,
|
||||
error?: Error
|
||||
};
|
||||
@@ -47,7 +47,8 @@ class LoadingDiff extends React.Component<Props, State> {
|
||||
.get(url)
|
||||
.then(response => response.text())
|
||||
.then(parser.parse)
|
||||
.then(diff => {
|
||||
// $FlowFixMe
|
||||
.then((diff: File[]) => {
|
||||
this.setState({
|
||||
loading: false,
|
||||
diff: diff
|
||||
|
||||
Reference in New Issue
Block a user