mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 06:25:45 +01:00
Move redundant prop to type
This commit is contained in:
@@ -3,12 +3,10 @@ import DiffFile from "./DiffFile";
|
|||||||
import { DiffObjectProps, File } from "./DiffTypes";
|
import { DiffObjectProps, File } from "./DiffTypes";
|
||||||
import Notification from "../Notification";
|
import Notification from "../Notification";
|
||||||
import { WithTranslation, withTranslation } from "react-i18next";
|
import { WithTranslation, withTranslation } from "react-i18next";
|
||||||
import { DefaultCollapsed } from "./defaultCollapsed";
|
|
||||||
|
|
||||||
type Props = WithTranslation &
|
type Props = WithTranslation &
|
||||||
DiffObjectProps & {
|
DiffObjectProps & {
|
||||||
diff: File[];
|
diff: File[];
|
||||||
defaultCollapse?: DefaultCollapsed;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class Diff extends React.Component<Props> {
|
class Diff extends React.Component<Props> {
|
||||||
|
|||||||
@@ -9,14 +9,12 @@ import Tag from "../Tag";
|
|||||||
import Icon from "../Icon";
|
import Icon from "../Icon";
|
||||||
import { Change, ChangeEvent, DiffObjectProps, File, Hunk as HunkType } from "./DiffTypes";
|
import { Change, ChangeEvent, DiffObjectProps, File, Hunk as HunkType } from "./DiffTypes";
|
||||||
import TokenizedDiffView from "./TokenizedDiffView";
|
import TokenizedDiffView from "./TokenizedDiffView";
|
||||||
import { DefaultCollapsed } from "./defaultCollapsed";
|
|
||||||
|
|
||||||
const EMPTY_ANNOTATION_FACTORY = {};
|
const EMPTY_ANNOTATION_FACTORY = {};
|
||||||
|
|
||||||
type Props = DiffObjectProps &
|
type Props = DiffObjectProps &
|
||||||
WithTranslation & {
|
WithTranslation & {
|
||||||
file: File;
|
file: File;
|
||||||
defaultCollapse?: DefaultCollapsed;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
type Collapsible = {
|
type Collapsible = {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { ReactNode } from "react";
|
import { ReactNode } from "react";
|
||||||
|
import { DefaultCollapsed } from "./defaultCollapsed";
|
||||||
|
|
||||||
// We place the types here and not in @scm-manager/ui-types,
|
// We place the types here and not in @scm-manager/ui-types,
|
||||||
// because they represent not a real scm-manager related type.
|
// because they represent not a real scm-manager related type.
|
||||||
@@ -77,4 +78,5 @@ export type DiffObjectProps = {
|
|||||||
fileAnnotationFactory?: FileAnnotationFactory;
|
fileAnnotationFactory?: FileAnnotationFactory;
|
||||||
annotationFactory?: AnnotationFactory;
|
annotationFactory?: AnnotationFactory;
|
||||||
markConflicts?: boolean;
|
markConflicts?: boolean;
|
||||||
|
defaultCollapse?: DefaultCollapsed;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -10,12 +10,10 @@ import { DiffObjectProps, File } from "./DiffTypes";
|
|||||||
import { NotFoundError } from "../errors";
|
import { NotFoundError } from "../errors";
|
||||||
import { Notification } from "../index";
|
import { Notification } from "../index";
|
||||||
import { withTranslation, WithTranslation } from "react-i18next";
|
import { withTranslation, WithTranslation } from "react-i18next";
|
||||||
import { DefaultCollapsed } from "./defaultCollapsed";
|
|
||||||
|
|
||||||
type Props = WithTranslation &
|
type Props = WithTranslation &
|
||||||
DiffObjectProps & {
|
DiffObjectProps & {
|
||||||
url: string;
|
url: string;
|
||||||
defaultCollapse?: DefaultCollapsed;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
type State = {
|
type State = {
|
||||||
|
|||||||
Reference in New Issue
Block a user