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 Notification from "../Notification";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { DefaultCollapsed } from "./defaultCollapsed";
|
||||
|
||||
type Props = WithTranslation &
|
||||
DiffObjectProps & {
|
||||
diff: File[];
|
||||
defaultCollapse?: DefaultCollapsed;
|
||||
};
|
||||
|
||||
class Diff extends React.Component<Props> {
|
||||
|
||||
@@ -9,14 +9,12 @@ import Tag from "../Tag";
|
||||
import Icon from "../Icon";
|
||||
import { Change, ChangeEvent, DiffObjectProps, File, Hunk as HunkType } from "./DiffTypes";
|
||||
import TokenizedDiffView from "./TokenizedDiffView";
|
||||
import { DefaultCollapsed } from "./defaultCollapsed";
|
||||
|
||||
const EMPTY_ANNOTATION_FACTORY = {};
|
||||
|
||||
type Props = DiffObjectProps &
|
||||
WithTranslation & {
|
||||
file: File;
|
||||
defaultCollapse?: DefaultCollapsed;
|
||||
};
|
||||
|
||||
type Collapsible = {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { ReactNode } from "react";
|
||||
import { DefaultCollapsed } from "./defaultCollapsed";
|
||||
|
||||
// We place the types here and not in @scm-manager/ui-types,
|
||||
// because they represent not a real scm-manager related type.
|
||||
@@ -77,4 +78,5 @@ export type DiffObjectProps = {
|
||||
fileAnnotationFactory?: FileAnnotationFactory;
|
||||
annotationFactory?: AnnotationFactory;
|
||||
markConflicts?: boolean;
|
||||
defaultCollapse?: DefaultCollapsed;
|
||||
};
|
||||
|
||||
@@ -10,12 +10,10 @@ import { DiffObjectProps, File } from "./DiffTypes";
|
||||
import { NotFoundError } from "../errors";
|
||||
import { Notification } from "../index";
|
||||
import { withTranslation, WithTranslation } from "react-i18next";
|
||||
import { DefaultCollapsed } from "./defaultCollapsed";
|
||||
|
||||
type Props = WithTranslation &
|
||||
DiffObjectProps & {
|
||||
url: string;
|
||||
defaultCollapse?: DefaultCollapsed;
|
||||
};
|
||||
|
||||
type State = {
|
||||
|
||||
Reference in New Issue
Block a user