import React from "react"; import DiffFile from "./DiffFile"; import { DiffObjectProps, File } from "./DiffTypes"; import Notification from "../Notification"; import { WithTranslation, withTranslation } from "react-i18next"; type Props = WithTranslation & DiffObjectProps & { diff: File[]; }; class Diff extends React.Component { static defaultProps: Partial = { sideBySide: false }; render() { const { diff, t, ...fileProps } = this.props; return ( <> {diff.length === 0 ? ( {t("diff.noDiffFound")} ) : ( diff.map((file, index) => ) )} ); } } export default withTranslation("repos")(Diff);