Replace relative path with absolute

This commit is contained in:
Florian Scholdei
2020-07-28 12:03:41 +02:00
parent f62e8d076d
commit e8d140173a
6 changed files with 19 additions and 10 deletions

View File

@@ -29,6 +29,7 @@ import { WithTranslation, withTranslation } from "react-i18next";
type Props = WithTranslation & {
changeset: Changeset;
baseUrl: string;
defaultCollapse?: boolean;
};
@@ -47,12 +48,12 @@ export const createUrl = (changeset: Collection) => {
class ChangesetDiff extends React.Component<Props> {
render() {
const { changeset, defaultCollapse, t } = this.props;
const { changeset, baseUrl, defaultCollapse, t } = this.props;
if (!isDiffSupported(changeset)) {
return <Notification type="danger">{t("changeset.diffNotSupported")}</Notification>;
} else {
const url = createUrl(changeset);
return <LoadingDiff url={url} defaultCollapse={defaultCollapse} sideBySide={false} changesetId={changeset.id} />;
return <LoadingDiff url={url} defaultCollapse={defaultCollapse} sideBySide={false} changesetId={changeset.id} baseUrl={baseUrl} />;
}
}
}